Skip to content

Instantly share code, notes, and snippets.

@bryandh
Created December 8, 2017 10:53
Show Gist options
  • Save bryandh/48d19a385139400dd904ca5d221b2dd8 to your computer and use it in GitHub Desktop.
Save bryandh/48d19a385139400dd904ca5d221b2dd8 to your computer and use it in GitHub Desktop.
Undo remote commit
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