标题:git切换分支报错:error: pathspec 'origin/XXX' did not match any file(s) known to git. 出处:向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除 时间:Thu, 16 Nov 2017 22:25:17 +0000 作者:jackxiang 地址:http://jackxiang.com/post/9522/ 内容: 现象:git checkout dev,出现,error: pathspec 'dev' 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 From:http://blog.csdn.net/lissdy/article/details/50291995 Generated by Jackxiang's Bo-blog 2.1.1 Release