Created
October 11, 2013 08:06
-
-
Save jeffchao/6931253 to your computer and use it in GitHub Desktop.
Revert git head back to last known specific commit. Typically useful on bad merges.
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
// Reset the index to the desired tree. | |
git reset <specific sha> | |
// Move the branch pointer back to the previous HEAD. | |
git reset --soft HEAD@{1} | |
git commit | |
git push origin master | |
// Update working copy to reflect the new commit. | |
git reset --hard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment