Skip to content

Instantly share code, notes, and snippets.

@SanCoder-Q
Forked from jamesmacaulay/git-revert-batch.sh
Created July 14, 2016 13:08
Show Gist options
  • Save SanCoder-Q/50d089d216885ed3f6a2515735639012 to your computer and use it in GitHub Desktop.
Save SanCoder-Q/50d089d216885ed3f6a2515735639012 to your computer and use it in GitHub Desktop.
function git-revert-batch {
echo "$@" | xargs -n1 git revert --no-commit
}
alias grb='git-revert-batch'
# use like:
# grb ee5c95a 981da8b
# list commits in reverse order, and it's ready to make one neat+tidy revert-commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment