-
-
Save WaYdotNET/95c04305256cdb62515d3913c27702b2 to your computer and use it in GitHub Desktop.
GIT reset head to a previous commit http://stackoverflow.com/questions/9529078/how-do-i-use-git-reset-hard-head-to-revert-to-a-previous-commit
This file contains 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
git log (get the commit id that you want to reset to) | |
git reset --hard "commit id" | |
git reset --soft HEAD@{1} | |
git commit -m "Reverting to the state of the project at commit id" | |
git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment