I wanted to squash my last 2 commits into one, so did a git rebase, in following way:
git rebase
git rebase -i HEAD~2
but due to a typo, wha
Both git reset --hard HEAD{x} and git reset --hard HEAD@{x} didn't work for me.
git reset --hard HEAD{x}
git reset --hard HEAD@{x}
I wanted a script to do this anyways, so I did the following.
BACK_2_SHA=`git reflog show --pretty=format:'%H' -n x | tail -n 1` git reset --hard $BACK_2_SHA