git切换分支报错:error: pathspec 'origin/XXX' did not match any file(s) known to git
Posted zy-dream
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git切换分支报错:error: pathspec 'origin/XXX' did not match any file(s) known to git相关的知识,希望对你有一定的参考价值。
项目上有一个分支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
转自 https://blog.csdn.net/lissdy/article/details/50291995
以上是关于git切换分支报错:error: pathspec 'origin/XXX' did not match any file(s) known to git的主要内容,如果未能解决你的问题,请参考以下文章
问题解决error: pathspec ‘XXX‘ did not match any file(s) known to git
error: pathspec ‘v0.11.1‘ did not match any file(s) known to git.
error: pathspec ‘v0.11.1‘ did not match any file(s) known to git.
error: pathspec ‘v0.11.1‘ did not match any file(s) known to git.
error: pathspec ‘v0.11.1‘ did not match any file(s) known to git.
Git使用之(pathspec master did not match any file(s) known to git)