Skip to content

Instantly share code, notes, and snippets.

@ahmed-bacha
Forked from rymawby/undo-git-rebase.sh
Last active August 29, 2015 14:21
Show Gist options
  • Select an option

  • Save ahmed-bacha/d6a810dcddc1107b0e4f to your computer and use it in GitHub Desktop.

Select an option

Save ahmed-bacha/d6a810dcddc1107b0e4f to your computer and use it in GitHub Desktop.
# find head commit
git reflog
# now reset hard - where N is the head commit found in the reflog
git reset --hard HEAD@{N}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment