当前位置: 代码迷 >> 综合 >> git签出远程分支问题解决
  详细解决方案

git签出远程分支问题解决

热度:47   发布时间:2024-01-21 15:03:18.0

使用命令

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

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

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

[plain]  view plain copy
  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 plain copy
  1. $ git fetch  
再

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