Created
December 8, 2017 10:53
-
-
Save bryandh/48d19a385139400dd904ca5d221b2dd8 to your computer and use it in GitHub Desktop.
Undo remote 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
1. `git rebase -i HEAD~2` | |
2. navigate to commit with arrows | |
3. press `d` twice to delete commit | |
4. enter `:wq` to save and quit (if it doesn’t let you, press escape first, and then enter this command) | |
5. force-push the branch to get rid of the remote commit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment