Git使用之(pathspec master did not match any file(s) known to git) 问题
执行命令
git checkout master
报错如下:
error: pathspec 'master' did not match any file(s) known to git
解决办法
先看下分支
git branch -a
查询结果
* develop
remotes/composer/develop
remotes/composer/feature/194
remotes/composer/feature/198
remotes/composer/feature/199
remotes/composer/feature/200
remotes/composer/master
remotes/origin/HEAD -> origin/develop
remotes/origin/develop
remotes/origin/feature/194
remotes/origin/feature/198
remotes/origin/feature/199
remotes/origin/feature/200
remotes/origin/master
这里会进入log,退出ctrl + c不管用,直接输入q即可(或者:q)
:q
如果没有看到你的分支,先获取所有分支
git fetch
然后再切换到你的分支即可
git check master