我正在尝试检查本地不存在的远程分支。
git checkout -b branch_name origin/branch_name
给出:
fatal: Cannot update paths and switch to branch 'branch_name' at the same time.
Did you intend to checkout 'origin/branch_name' which can not be resolved as commit?
git branch -a
没有显示我正在尝试 checkout 的分支。
如何在本地 checkout 远程分支?
最佳答案
试试这个
git remote update
git fetch
git checkout -b branch_name origin/branch_name
您的本地仓库不知道远程分支。
关于Git:如何 checkout 新的远程分支?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31286881/