使用git的时候,有时候会出现远端更新了一个分支,但是从本地想checkout一个远程分支时,会出现如下错误:

fatal: git checkout: updating paths is incompatible with switching branches. Did you intend to checkout 'origin/develop' which can not be resolved as commit?

并且在本地查看git branch -a,也看不到远程新加的那个分支,解决办法是更新远程分支路径,命令是:

git fetch origin

posted on 2013-08-17 10:04  andy071001  阅读(1564)  评论(0编辑  收藏  举报