Answers for "is it possible to undo a rebase"

2

git undo rebase

git reset --hard ORIG_HEAD
Posted by: Guest on March-26-2020
0

revert rebase

The easiest way would be to find the head commit of the branch as it was 
immediately before the rebase started in the reflog...

git reflog

and to reset the current branch to it (with the usual caveats about being
absolutely sure before reseting with the --hard option).
Suppose the old commit was HEAD@{2} in the ref log:

git reset --hard HEAD@{2}
Posted by: Guest on February-18-2022

Code answers related to "is it possible to undo a rebase"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language