Skip to content

Instantly share code, notes, and snippets.

@todgru
Created December 20, 2012 01:20
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save todgru/4342254 to your computer and use it in GitHub Desktop.
Save todgru/4342254 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