Undoing a git rebase

前端 未结 18 1433
孤城傲影
孤城傲影 2020-11-22 02:41

Does anybody know how to easily undo a git rebase?

The only way that comes to mind is to go at it manually:

  • git checkout the commit parent to both of t
18条回答
  •  臣服心动
    2020-11-22 03:11

    Charles's answer works, but you may want to do this:

    git rebase --abort
    

    to clean up after the reset.

    Otherwise, you may get the message “Interactive rebase already started”.

提交回复
热议问题