reflog is the undo button for the rebase you regret
Every position HEAD has been in for the last 90 days is recorded, even after a reset, a rebase or a deleted branch.
git reflog
# a1b2c3d HEAD@{3}: rebase (finish): returning to refs/heads/feat
# f4e5d6c HEAD@{4}: commit: the state before the rebase
git reset --hard HEAD@{4}Nothing that was committed is lost until the reflog expires. Panic later, look here first.
git