Skip to content

Instantly share code, notes, and snippets.

@wavecos
Created July 1, 2015 12:56
Show Gist options
  • Save wavecos/e58833ed38d63d488a59 to your computer and use it in GitHub Desktop.
Save wavecos/e58833ed38d63d488a59 to your computer and use it in GitHub Desktop.
git: Reset Local Repository (undo changes) like HEAD
# http://stackoverflow.com/questions/1628088/reset-my-local-repository-to-be-just-like-remote-repository-head
# http://stackoverflow.com/questions/5473/how-can-i-undo-git-reset-hard-head1
git fetch origin
git reset --hard origin/master
# Optionally
git reset --hard HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment