Create an inverse commit to flip a previous change. Child’s play:
$ git revert <REFSPEC>
The new commit looks like:
commit 09cc98e3fa121774750728f5fa337befeb02d914
Author: Dustin Oprea <dustin@randomingenuity.com>
Date: Tue Mar 27 16:02:25 2018 -0400
Revert "What's the worst that could happen?"
This reverts commit cf4fc9a50a20a633b82ee28ef9efa46df86db18d.
A lot more nicer and a lot more professional than copying-and-pasting into a new commit or dropping an old commit with a rebase.
It is nearly identical to similar, existing features provided by many version-control review systems.