Commits cannot be changed without getting a new hash. So when I want to add something after the fact, like “this one was tested” or a link to the issue, a note is the polite way.
git notes add -m 'Tested on Debian 13' 72a144e2
Leave out the commit ID and the note goes on HEAD. The docs say notes are shown by git log along with the original commit message, and the commit hash stays exactly the same.
The docs say notes are stored in a separate ref, refs/notes/commits by default. That is why they can be added later without touching the commit.
Where I’d use it: marking which commit was deployed, adding review remarks to someone else’s commit, or noting why a commit was reverted, all without a history rewrite that forces everyone to pull again.
Caveat: because notes live in their own ref, they do not travel with your branches in the same way. I would not assume a colleague or a CI system sees them until I have checked how that remote and that clone handle refs/notes. For something everyone must see, the commit message or the pull request is the safer place.
Further reading: git-notes documentation