Reverting merge / rebase

git reflog # See which was the commit before the rebase
git status # Make sure no changes, otherwise stash them
git reset <commit hash from step 1.> --hard # takes you back to the commit before the rebase