当前位置:   article > 正文

git切换分支报错 :error: pathspec 'origin/XXX' did not match any file known to git._pathspec 'origin' did not match any files

pathspec 'origin' did not match any files

项目上有一个分支test,使用git branch -a看不到该远程分支,直接使用命令git checkout test报错如下:

error: pathspec 'origin/test' did not match any file(s) known to git.

解决方法: 
1、执行命令git fetch取回所有分支的更新

2、执行git branch -a可以看到test分支(已经更新分支信息)

3、切换分支git checkout test

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/人工智能uu/article/detail/927391
推荐阅读
相关标签
  

闽ICP备14008679号