Git: Pulling back clone changes into the master it was cloned from
We have a server with several users, one of which /home/dev
is a "common" user. All of our original Git working trees are stored in /home/dev
, and all of these became the master from which we cloned bare repos into /home/git
. From these bare /home/git
repos, each user clones them into his own /home/开发者_StackOverflow中文版user
area, and then pulls common updates from and pushes his updates to the bare repos. Ok so far.
But when we cd to /home/dev/master-repo
(say) and try to do a pull from its bare clone in /git/master-repo.git
with the command: git pull /git/master-repo.git
, we get a fatal Git error:
/git/master-repo.git does not appear to be a git repository.
We could simply delete the /home/dev/master-repo
, and clone it from its bare repo in /home/git
. Then /home/dev
would be just like any other user. But I would like to know why the pull can't recognize the bare clone as a git repository.
git pull /git/master-repo.git
From your description it sounds as if this path is incorrect. Shouldn't the following be correct?
git pull /home/git/master-repo.git
精彩评论