git revert
is an inverse of git cherry-pick
. I had a branch raven
earlier and I wanted some changes from it to be standard in master with
a replacement branch with the converse of those changes. So
$ git checkout master
$ git merge raven
$ git checkout -b newbranch
$ git revert -n [sha of the changes] <-- THIS is literally:
invert the commit and cherry-pick it