开发者

git pull branch with absolute path

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜