A side-channel for things that don't belong in the commit message.
Attach metadata to a commit without changing the commit. Useful for review notes, build IDs, or any annotation you don't want bleeding into the message itself.
Notes live in a separate ref (default refs/notes/commits). Each note is a blob keyed by the commit's SHA. They don't affect the commit's SHA at all. They have their own remote-tracking dance — they don't push or fetch by default.
git notes [list [<object>]]
git notes add [-f] [--allow-empty] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
git notes copy [-f] (--stdin | <from-object> [<to-object>])
git notes append [--allow-empty] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
git notes edit [--allow-empty] [<object>] [--allow-empty]
git notes show [<object>]
git notes merge [-v | -q] [-s <strategy>] <notes-ref>
git notes merge --commit [-v | -q]
git notes merge --abort [-v | -q]
git notes remove [--ignore-missing] [--stdin] [<object>...]
git notes prune [-n] [-v]
git notes get-ref| Flag | What it does |
|---|---|
add -m "<msg>" | Add a note to a commit. |
show <commit> | Show the note for a commit. |
edit <commit> | Edit the note in $EDITOR. |
remove <commit> | Delete the note. |
--ref=<name> | Use a different notes namespace. |
$ git notes add -m 'rev: looks good' HEAD~1$ git notes show HEAD~1$ git notes edit HEAD~1$ git notes append -m 'second pass: still good' HEAD~1$ git notes remove HEAD~1$ git notes list$ git notes merge refs/notes/upstream$ git notes prune$ git notes add -m 'rev: looks good, ship it' HEAD~1$ git log --show-notes$ git push origin refs/notes/commitsHit each option, then Check answers. Score is recorded; Next is always open.