Skip to content

Instantly share code, notes, and snippets.

@anapaulagomes
Last active August 7, 2018 08:30
Show Gist options
  • Save anapaulagomes/78fd7985244fdf75a4118eaad4e657e3 to your computer and use it in GitHub Desktop.
Save anapaulagomes/78fd7985244fdf75a4118eaad4e657e3 to your computer and use it in GitHub Desktop.
Undoing a git rebase (or other operations like git merge)
$ git reflog my-branch # get the hash of the commit you want to be the HEAD (to be the last one in your git log)
$ git reset --hard a91ab06a5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment