git undo rebase
git reset --hard ORIG_HEAD
git undo rebase
git reset --hard ORIG_HEAD
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}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us