Git remote repo, not showing the files

dzm

I've setup a remote git repo and pushed my local repo to the remote repo. This worked fine as expected, however on the remote repo, I don't see the files associated to the project, it just has branches, config, description, HEAD, etc.

Where are the actual project file for the repo?

Here's what I did:

Remote Server:

cd /var/www/directory
git --bare init

Local Project (in git repo):

git remote add remote root@IP:/var/www/directory
git push remote master

This worked, it pushed as you would expect. Just when I go to /var/www/directory the project files aren't there, only git related files.

Schleis

You have created a "bare" repo. It doesn't contain the files just information about the commits.

A "bare" repository in Git just contains the version control information and no working files (no tree) and it doesn't contain the special .git sub-directory. Instead, it contains all the contents of the .git sub-directory directly in the main directory itself.

http://bitflop.com/document/111

It looks like you want to push to deploy your changes. Rather what you should do is create a non-bare repo in your /var/www/directory and pull from your developement repo or a bare repo. You will have a non-bare repo in your location and when you want to deploy updates you will run git pull from the directory which will update the files. This will also allow you easily move the code to a previous version if there are major issues with the last updates using git checkout <SHA>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Git remote repo, not showing the files

From Dev

Git remote repo no showing in <ul>

From Dev

Git status - Not showing states of remote Repo

From Dev

git not overwriting remote repo with local files?

From Dev

Going remote from local repo: Git and forgetting large files

From Dev

git server read files from it's repo(remote)

From Dev

Going remote from local repo: Git and forgetting large files

From Dev

Git repo keeps showing modified files even in a fresh clone

From Dev

Working with remote repo git

From Dev

Git clone remote repo into another remote repo

From Dev

git sparseCheckout repo pushes full repo to remote

From Dev

Push git alias to remote repo

From Dev

Failure to push to remote repo in Git

From Dev

feasibility of git without a remote repo

From Dev

Error Pushing to Remote Git Repo

From Dev

feasibility of git without a remote repo

From Java

List files in local git repo?

From Dev

Visual Studio 2013 Configure Remote Git Repo

From Dev

How do determine the URL of a remote git repo?

From Dev

How to compare local with remote git repo in PhpStorm?

From Dev

Force a certain version of git on push to remote repo

From Dev

Check if local git repo is ahead/behind remote

From Dev

When a commit was pushed into a remote Git Repo

From Dev

How to cleanup garbage in remote git repo

From Dev

List branches of a git remote repo without cloning it

From Dev

Is git stash stack pushed to the remote repo?

From Dev

Track existing folder from remote git repo

From Dev

Adding svn-remote to existing git repo

From Dev

Add subdirectory of remote repo with git-subtree