git notes lets you annotate commits after they're made, without changing their hashes.
git notes add -m "reviewed by @alice" HEAD
git notes show HEAD # display the note
git log --show-notes # log with notes inline
Notes live in their own refs namespace (refs/notes/commits) and don't push by default. Opt in:
git push origin refs/notes/commits
Use cases:
- Reviewer signatures.
- Build/CI metadata (which deploy this commit went into).
- Post-hoc cross-references to issues or external tickets.
Most teams don't use notes — they're niche. But when you need to add a fact to a published commit without breaking its hash, it's the only clean option.