Skip to content

Instantly share code, notes, and snippets.

@amitsaha
Created August 9, 2017 01:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amitsaha/ca349af92c5f0f54c1ac9c3e9104d093 to your computer and use it in GitHub Desktop.
Save amitsaha/ca349af92c5f0f54c1ac9c3e9104d093 to your computer and use it in GitHub Desktop.
Figure out whether a git reverted commit has been reverted

We have a commit, which was reverted, and then re-reverted, and it goes on. How do you find your original commit is now reverted or re-reverted?

$ git log --oneline  | grep "<commit message>" | grep  "Revert" | wc -l

If the number is even, your original change is in the repo, else not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment