Skip to content

Instantly share code, notes, and snippets.

@mmeinhart
Created February 14, 2014 18:18
Show Gist options
  • Save mmeinhart/9006124 to your computer and use it in GitHub Desktop.
Save mmeinhart/9006124 to your computer and use it in GitHub Desktop.
Git: Reset Options
# With git log check which commit is one prior the merge. Then you can reset it using:
git reset --hard commit_sha
# There's also another way
git reset --hard HEAD~5
# will get you back 5 commits.
# Assuming your local master was not ahead of origin/master, you should be able to do
git reset --hard origin/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment