git分支无法获取


git 上新建的分支,本地想要拉取该分支,但是找不到这个分支

使用  git branch -a  也看不到该分支

使用命令:

git checkout -b branch_nameA origin/branch_nameB

有如下报错信息:

fatal: Cannot update paths and switch to branch 'branch_nameA' at the same time. 
Did you intend to checkout 'origin/branch_nameB' which can not be resolved as commit?

解决方法:

git remote update
git fetch
git checkout -b branch_nameA origin/branch_nameB

参考:https://stackoverflow.com/questions/22984262/cannot-update-paths-and-switch-to-branch-at-the-same-time


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM