git 拉取远程分之到本地

来源:互联网 发布:js 直接下载txt文件 编辑:程序博客网 时间:2024/05/16 05:01

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 updategit fetch
然后再使用:
git checkout -b local-name origin/remote-name
命令即可。
参考资料:Git checkout on a remote branch does not work

原创粉丝点击