当前位置:   article > 正文

git checkout 出错原因 (error: pathspec 'master' did not match any file(s) known to )_git checkout error: pathspec

git checkout error: pathspec

git checkout 报错原因

在一个空的目录中(/item)

执行命令

git init

成功创建一个空的git仓库

执行:

git checkout -b dev

成功创建一个dev分支

现在想checkout到master分支

执行:

git checkout mster

不好意思,突然报错了,是什么原因呢?

错误信息如下:

error: pathspec 'master' did not match any file(s) known to

这是因为,还没有提交过,即没有commit过任何文件,当commit过以后就可以切换分支了。

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

闽ICP备14008679号