git checkout -b newbranch_name --track origin/feature/newbranch_name
如果遇到类似:
fatal: git checkout: updating paths is incompatible with switching branches.
Did you intend to checkout 'origin/remote-name' which can not be resolved as commit?
的问题
可使用一下命令:
git remote show origin然后再使用:git remote update git fetch
命令即可。git checkout -b local-name origin/remote-name
参考资料:Git checkout on a remote branch does not work
本文介绍了如何使用git的checkout命令将远程的feature/newbranch_name分支克隆到本地,并创建一个新的本地分支newbranch_name,同时设置跟踪远程分支。
7956

被折叠的 条评论
为什么被折叠?



