Forgot “git rebase --continue” and did “git commit”. How to fix?

后端 未结 4 518
耶瑟儿~
耶瑟儿~ 2020-12-07 12:39

I was rebasing code in git, I got some merge conflicts. I resolved the conflicts and did:

git add

At this point I forgot to do:

<         


        
4条回答
  •  星月不相逢
    2020-12-07 13:24

    I had git rebased, fixed conflicts, git added file with conflicts, and (mistakenly) committed.

    I tried the git reset --soft HEAD^ and git reset --hard solutions given, but neither worked for me.

    However, just git rebase --abort worked: it took me back to before the start of the rebase with a clean working tree.

提交回复
热议问题