Amending history without rewriting
What should you do if what you need to fix is in the published part of the history? As described in The perils of rewriting published history, changing those parts of the history that were made public can cause problems for downstream developers. You had better not touch this part of the graph of revisions.
There are a few solutions to this problem. The most commonly used one is to put in a new fixup commit with appropriate changes (for example, a typo fix in documentation). If what you need is to remove the changes, deciding that they turned out to be bad to have in the history, you can create a commit to revert the changes.
If you fix a commit or revert one, it would be nice to annotate that commit with the information that it was buggy, as well as which commit fixed (or reverted) it. Even though you cannot (and should not) edit the fixed commit to add this information if the commit is public, Git provides the notes mechanism to append extra...