Git Advanced Cheat Sheet/Attach a note to a commit

Add metadata to a commit without rewriting it.

Section: Specialized Tools

Attach a note to a commit

bash
bash
git notes add -m "Reviewed by security team" <commit_sha>
Explanation

Git notes let you annotate objects while preserving their original identity and hash.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Specialized Tools
Cherry-pick a range without committing
Apply commit changes into the index and working tree first.
OpenIn sheetbashsame section
Initialize and update submodules recursively
Populate nested submodules after clone or after config changes.
OpenIn sheetbashsame section
Compare two versions of a branch series
Review how a patch series changed across rebases.
OpenIn sheetbashsame section
Interactive rebase last 5 commits
Open the last 5 commits in the interactive rebase todo list.
OpenIn sheetbash1 tag match
Show reflog with local timestamps
Inspect branch and HEAD movements with readable times.
OpenIn sheetbash1 tag match
Create an additional worktree for a branch
Check out another branch in a separate directory without cloning again.
OpenIn sheetbash1 tag match