Skip to content

Instantly share code, notes, and snippets.

@leojweda
Last active August 20, 2017 22:34
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 leojweda/6780957ab3ef9254b6581e122620ea60 to your computer and use it in GitHub Desktop.
Save leojweda/6780957ab3ef9254b6581e122620ea60 to your computer and use it in GitHub Desktop.
A shell script that searches for all commits with a particular commit message and revert those commits.
#! /bin/sh
git log --pretty=oneline --grep="$1" | awk '{print $1}' | xargs git revert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment