Skip to content

Instantly share code, notes, and snippets.

@rymawby
Created June 14, 2013 18:37
Show Gist options
  • Save rymawby/5784205 to your computer and use it in GitHub Desktop.
Save rymawby/5784205 to your computer and use it in GitHub Desktop.
Undoing a git rebase
# find head commit
git reflog
# now reset hard - where N is the head commit found in the reflog
git reset --hard HEAD@{N}
@lbr88
Copy link

lbr88 commented Feb 9, 2015

thanks

@chrislawes
Copy link

👍

@danielnieto
Copy link

you saved me 1 day of work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment