I've been using the following command for checkout:
git --git-dir=C开发者_StackOverflow中文版:/home/www/project/.git --work-tree=C:/home/www/project/ checkout branch
I'm trying to replicate the same behavior for pull:
git --git-dir=C:/home/www/project/.git --work-tree=C:/home/www/project/ pull origin branch
It fails with the following error:
fatal: C:\Program Files (x86)\Git/libexec/git-core/git-pull cannot be used without a working tree.
What's wrong? Why it's not working? Please help!
Is there some reason you cannot run (cd c:/home/www/project && git pull origin branch) assuming you are using the msysgit bash shell.
精彩评论