git notes add -m "<message>"
This command lets you attach extra information to a commit without changing the commit itself, which is useful for annotations like review notes, deployment details, or explanations. Instead of amending commit messages, you can keep separate, editable metadata linked to a commit.
The notes subcommand works with Git’s notes system, and add creates a new note for the current HEAD commit (or updates it if one already exists). The -m (or --message) flag tells Git to use the provided "<message>" string as the note’s content directly from the command line, instead of opening an editor. The "<message>" placeholder is where you put the text you want to store as the note.
Related: Use git notes show to read notes attached to a commit, git notes edit to open and modify an existing note in your editor, or git notes remove to delete a note from a commit.
Examples:
git notes add -m "Investigated and confirmed this fixes the login bug"git notes add -m "Deployed to production on 2026-02-18 by alice"git notes add -m "Needs follow-up refactor after milestone release"