Created
July 8, 2011 20:52
-
-
Save douglas/1072791 to your computer and use it in GitHub Desktop.
Remove an unwanted commit on git and github
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
# force git/github to ignore a unwanted commit and use HEAD^ as HEAD of the repository | |
$ git push -f origin HEAD^:remote_branch | |
OR | |
$ git rebase -i HEAD~2 | |
$ git push origin +master | |
References: | |
http://stackoverflow.com/questions/448919/how-can-i-remove-a-commit-on-github | |
Supreme git magic -----> http://www-cs-students.stanford.edu/~blynn/gitmagic/ch05.html#_8230_and_then_some |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment