通过git resetgit checkout进行版本回退之后再次git pull抛出以下错误:

You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

意思是当前的版本已经不在master分支了,解决的办法:

  1. git status查看所有变化的文件,把有改动的先删除。
  2. git checkout master回到主分支。
  3. git pull拉取最新代码。
最后修改:2018 年 12 月 16 日
如果觉得我的文章对你有用,请随意赞赏