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