You keyed in git rebase , and pressed Enter like a ๐.
Then everything looks ...๐ฅ... not exactly the same as you expected it.
๐ you realised that you didn't push โ
any of your recent work and you're at a point of no return! ๐จ
๐ฎ
๐จ
๐ฑ
๐ฐ
๐ฉ
๐
PANIC
๐ก
Here's a solution
Use
git reflog- Manage reflog information.
In the terminal, type in
git reflog.
You'll see a list of all recent commits.

Pick the one which you worked last.
In my case, commit 29b5617 was the one I needed to go back to.
git reset --hard 29b5617

Alternatively,git reset --hard HEAD@{17}would have worked exactly the same.
Let the rest know how you've survived an unwanted git rebase by leaving a comment.
git rebase by leaving a comment.
Top comments (1)
Oh my god did I need this earlier today.