Skip to content

Instantly share code, notes, and snippets.

@dexhunter
Forked from todgru/git_revert.md
Created March 16, 2018 06:48
Show Gist options
  • Save dexhunter/55b269b4bde1bb9929451a7c765d5f74 to your computer and use it in GitHub Desktop.
Save dexhunter/55b269b4bde1bb9929451a7c765d5f74 to your computer and use it in GitHub Desktop.
how to use git revert --strategy resolve

Oh yes, this is nice:

git revert --strategy resolve <sha-ish>

Given a git log of A--B--C--D--E you can remove commit C using:

git revert --strategy resolve <sha-of-C> 

Which will produce:

A--B--C--D--E--REVERTC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment