All skills
Skillintermediate

git-notes - Commit Metadata Annotations

Use when adding metadata to commits without changing history, tracking review status, test results, code quality annotations, or supplementing commit messages post-hoc.

Claude Code Knowledge Pack7/10/2026

Overview

git-notes - Commit Metadata Annotations

Use when adding metadata to commits without changing history, tracking review status, test results, code quality annotations, or supplementing commit messages post-hoc.

  • Purpose - Attach non-invasive metadata to Git objects without modifying commit history
  • Core Principle - Add information to commits after creation without rewriting history

Key Concepts

ConceptDescription
Notes refStorage location, default refs/notes/commits
Non-invasiveNotes never modify SHA of original object
NamespacesUse --ref for different note categories (reviews, testing, audit)
DisplayNotes appear in git log and git show output

Quick Reference

TaskCommand
Add notegit notes add -m "message" <sha>
View notegit notes show <sha>
Append to notegit notes append -m "message" <sha>
Use namespacegit notes --ref=<name> <command>
Push notesgit push origin refs/notes/<name>

Common Use Cases

  • Code Review Tracking - Mark commits as reviewed with reviewer attribution
  • Test Results Annotation - Record test pass/fail status and coverage
  • Audit Trail - Attach security review or compliance information
  • Sharing Notes - Push/fetch notes to share metadata with team