How to undo or abort a Git rebase process?

Published January 11, 2021

Sometimes during a Git rebase process, you may encounter some merge conflicts and Git asks you to resolve the conflicts to move forward with the rebasing.

There is also an option to completely abort or undo this rebase process, which doesn't mean it will remove the conflicts but will help you to undo a fully rebased branch to its original state before the rebase or abort the rebase process so that you can continue with it later onwards.

You can do this by passing an --abort flag to the git rebase command during the rebase process like this,

git rebase --abort

This aborts the whole rebase process.

Feel free to share if you found this useful 😃.


Share on: Facebook Twitter