Git: cannot checkout branch - error: pathspec '…' did not match any file(s) known to git

问题: 今天在checkout项目的时候报了如下错误

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

解决方案:

    先执行:git fetch 把新分支信息拉到本地,但是不拉code

    在执行:git checkout 

常用的git命令:

    git status

    git log --oneline

    git branch -av

    git reset --hard

    git rebase

参考:http://stackoverflow.com/questions/5989592/git-cannot-checkout-branch-error-pathspec-did-not-match-any-files-kn

猜你喜欢

转载自my.oschina.net/u/1791774/blog/902794