首页 > 其他 > 详细

三分钟教你学Git (九) - 新建分支错误

时间:2015-05-04 20:15:50      阅读:115      评论:0      收藏:0      [点我收藏+]

zhc@hongchangfirst$ git checkout -b hongchangfirst origin/hongchangfirst

出现:

fatal: Cannot update paths and switch to branch ‘hongchangfirst‘ at the same time.

Did you intend to checkout ‘hongchangfirst‘ which can not be resolved as commit?


然后我们执行命令:

git branch -a

里边并不包含远程都hongchangfirst分支。


远程仓库明明有hongchangfirst分支,可是为什么告诉没有呢?

原来这条命令并没有每一次都从远程更新仓库信息,这样子做是为了效率,我们可以手动更新一下:


git fetch origin

然后我们在git branch -a

发现了我们都远程分支,然后我们在做新建一个分支:

git checkout -b hongchangfirst origin/hongchangfirst


okay了。

原文:http://blog.csdn.net/hongchangfirst/article/details/45312139

作者:hongchangfirst

hongchangfirst的主页:http://blog.csdn.net/hongchangfirst




三分钟教你学Git (九) - 新建分支错误

原文:http://blog.csdn.net/hongchangfirst/article/details/45312139

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!