Created
July 1, 2015 12:56
-
-
Save wavecos/e58833ed38d63d488a59 to your computer and use it in GitHub Desktop.
git: Reset Local Repository (undo changes) like HEAD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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