Broken branch in git, fatal: your current branch appears to be broken

前端 未结 9 1316
时光说笑
时光说笑 2021-02-01 12:57

Here is my case:

  • I was working on one branch.
  • Pushed new commits to the remote.
  • Switched back to the master branch.

But suddenly

9条回答
  •  暖寄归人
    2021-02-01 13:33

    I had the same problem. I just deleted all the files inside .git/refs/heads, then I tried to edit one of my files in order for git to accept commit. Then, when I pushed my files, I got this error:

    10:47 Push rejected Push has been cancelled, because there were conflicts during update. Check that conflicts were resolved correctly, and invoke push again.

    However, I solved it by accepting the rebase option when merging the files, giving no conflicts.

提交回复
热议问题