git签出远程分支问题解决

来源:互联网 发布:swmm中文版软件下载 编辑:程序博客网 时间:2024/05/22 02:17

使用命令

[plain] view plaincopy
  1. $ git checkout -b develop origin/develop  

[plain] view plaincopy
  1. $ git checkout --track origin/develop  

签出远程分支,出现以下错误:

[plain] view plaincopy
  1. fatal: Cannot update paths and switch to branch 'develop' at the same time.  
  2. Did you intend to checkout 'origin/develop' which can not be resolved as commit?  

解决方法:

[plain] view plaincopy
  1. $ git fetch  

[plain] view plaincopy
  1. $ git checkout -b develop origin/develop  
0 0