Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when adding metadata to commits without changing history, tracking review status, test results, code quality annotations, or supplementing commit messages post-hoc - provides git notes commands and patterns for attaching non-invasive metadata to Git objects.
.claude/skills/bilal140202-git-notes/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-21 | ✗→✓ | ▲ Improved | 30% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 287% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 540% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 120% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 96% | 0% |
Git notes attach metadata to commits (or any Git object) without modifying the objects themselves. Notes are stored separately and displayed alongside commit messages.
Core principle: Add information to commits after creation without rewriting history.
| Concept | Description | |---------|-------------| | Notes ref | Storage location, default refs/notes/commits | | Non-invasive | Notes never modify SHA of original object | | Namespaces | Use --ref for different note categories | | Display | Notes appear in git log and git show output |
| Task | Command | |------|---------| | Add note | git notes add -m "message" <sha> | | View note | git notes show <sha> | | Append | git notes append -m "message" <sha> | | Edit | git notes edit <sha> | | Remove | git notes remove <sha> | | Use namespace | git notes --ref=<name> <command> | | Push notes | git push origin refs/notes/<name> | | Fetch notes | git fetch origin refs/notes/<name>:refs/notes/<name> | | Show in log | git log --notes=<name> |
For complete command reference, see references/commands.md.
bash# Mark reviewed git notes --ref=reviews add -m "Reviewed-by: Alice <alice@example.com>" abc1234 # View review status git log --notes=reviews --oneline
bash# Push to remote git push origin refs/notes/reviews # Fetch from remote git fetch origin refs/notes/reviews:refs/notes/reviews
bashgit config notes.rewrite.rebase true git config notes.rewriteMode concatenate
| Mistake | Fix | |---------|-----| | Notes not showing in log | Specify ref: git log --notes=reviews or configure notes.displayRef | | Notes lost after rebase | Enable: git config notes.rewrite.rebase true | | Notes not on remote | Push explicitly: git push origin refs/notes/commits | | "Note already exists" error | Use -f to overwrite or append to add |
| Practice | Rationale | |----------|-----------| | Use namespaces | Separate notes by purpose (reviews, testing, audit) | | Be explicit about refs | Always specify --ref for non-default notes | | Push notes explicitly | Document sharing procedures in team guidelines | | Use append over add -f | Preserve note history when accumulating | | Configure rewrite preservation | Run git config notes.rewrite.rebase true before rebasing |
Complete reference for all git notes commands and options.
bash# Add note to current HEAD git notes add -m "Reviewed by Alice" # Add note to specific commit git notes add -m "Tested on Linux" abc1234 # Add note from file git notes add -F review-comments.txt abc1234 # Add note interactively (opens editor) git notes add abc1234 # Overwrite existing note git notes add -f -m "Updated review status" abc1234 # Add empty note git notes add --allow-empty abc1234
bash# Show note for HEAD git notes show # Show note for specific commit git notes show abc1234 # View commit with notes in log git log --show-notes git show abc1234 # List all notes git notes list # List note for specific object git notes list abc1234
Example output with notes:
commit abc1234def567890
Author: Developer <dev@example.com>
Date: Mon Jan 15 10:00:00 2024 +0000
feat: implement user authentication
Notes:
Reviewed by Alice
Tested-by: CI Bot <ci@example.com>bash# Append to existing note (creates if doesn't exist) git notes append -m "Additional review comment" abc1234 # Append from file git notes append -F more-comments.txt abc1234 # Append multiple messages git notes append -m "Comment 1" -m "Comment 2" abc1234
bash# Edit note interactively (opens editor) git notes edit abc1234 # Edit note for HEAD git notes edit
bash# Remove note from HEAD git notes remove # Remove note from specific commit git notes remove abc1234 # Remove notes from multiple commits git notes remove abc1234 def5678 ghi9012 # Ignore missing notes (no error if note doesn't exist) git notes remove --ignore-missing abc1234 # Remove notes via stdin (bulk removal) echo "abc1234" | git notes remove --stdin
bash# Copy note from one commit to another git notes copy abc1234 def5678 # Copy note to HEAD git notes copy abc1234 # Force overwrite destination note git notes copy -f abc1234 def5678 # Bulk copy via stdin (useful with rebase/cherry-pick) echo "abc1234 def5678" | git notes copy --stdin
bash# Remove notes for objects that no longer exist git notes prune # Dry-run to see what would be pruned git notes prune -n # Verbose output git notes prune -v
bash# Show current notes ref being used git notes get-ref
Notes can be organized into separate namespaces (refs) for different purposes.
bash# Add note to specific namespace git notes --ref=refs/notes/reviews add -m "Approved" abc1234 # Shorthand (refs/notes/ prefix is assumed) git notes --ref=reviews add -m "Approved" abc1234 # View notes from specific namespace git notes --ref=reviews show abc1234 # List notes in namespace git notes --ref=reviews list
bash# Set default notes ref for session export GIT_NOTES_REF=refs/notes/reviews git notes add -m "Approved" # View notes from environment ref git notes show abc1234
bash# Show specific notes namespace in log git log --notes=reviews # Show multiple namespaces git log --notes=reviews --notes=testing # Show all notes git log --notes='*' # Disable notes display git log --no-notes
When notes exist in multiple refs or from different sources, they can be merged.
bash# Merge notes from another ref into current git notes merge refs/notes/other # Merge with strategy git notes merge -s union refs/notes/other git notes merge -s ours refs/notes/other git notes merge -s theirs refs/notes/other git notes merge -s cat_sort_uniq refs/notes/other # Quiet merge git notes merge -q refs/notes/other # Verbose merge git notes merge -v refs/notes/other
| Strategy | Behavior | |----------|----------| | manual | Interactive conflict resolution (default) | | ours | Keep local note on conflict | | theirs | Keep remote note on conflict | | union | Concatenate both notes | | cat_sort_uniq | Concatenate, sort lines, remove duplicates |
bash# After merge conflict with manual strategy # Resolve conflicts in .git/NOTES_MERGE_WORKTREE/ # Commit resolved merge git notes merge --commit # Abort merge git notes merge --abort
bash# Set default notes ref git config notes.displayRef refs/notes/reviews # Display multiple notes refs git config --add notes.displayRef refs/notes/testing # Set merge strategy for notes git config notes.mergeStrategy union # Set merge strategy for specific namespace git config notes.reviews.mergeStrategy theirs # Preserve notes during rebase git config notes.rewrite.rebase true # Preserve notes during amend git config notes.rewrite.amend true # Set rewrite mode git config notes.rewriteMode concatenate
gitconfig[notes] displayRef = refs/notes/reviews displayRef = refs/notes/testing mergeStrategy = union [notes "reviews"] mergeStrategy = theirs [notes.rewrite] rebase = true amend = true
bash# Mark commit as reviewed git notes --ref=reviews add -m "Reviewed-by: Alice <alice@example.com>" abc1234 # Add review comments git notes --ref=reviews append -m "Consider extracting helper function" abc1234 # View review status git log --notes=reviews --oneline # Mark as approved git notes --ref=reviews add -f -m "APPROVED by Alice" abc1234
bash# Record test pass git notes --ref=testing add -m "Tests passed: 2024-01-15 Platform: Linux x64 Coverage: 85%" abc1234 # Record test failure git notes --ref=testing add -m "FAILED: Integration tests See: https://ci.example.com/build/123" def5678 # View test status across commits git log --notes=testing --oneline
bash# Add audit note git notes --ref=audit add -m "Security review: PASSED Reviewer: Security Team Date: 2024-01-15 Ticket: SEC-456" abc1234 # Query audit status git log --notes=audit --grep="Security review"
bash# Push notes to remote git push origin refs/notes/reviews # Fetch notes from remote git fetch origin refs/notes/reviews:refs/notes/reviews # Push all notes refs git push origin 'refs/notes/*' # Fetch all notes refs git fetch origin 'refs/notes/*:refs/notes/*'
bash# Add notes to all commits by author in date range git log --format="%H" --author="Alice" --since="2024-01-01" | \ while read sha; do git notes add -m "Author verified" "$sha" done # Remove notes from range of commits git log --format="%H" HEAD~10..HEAD | xargs git notes remove --ignore-missing
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 4,060 | 2,373 | -42% | 1 | 1 | 0% | 809 | 3,133 | +287% | 0 | 0 | — |
case-02 | pass→pass | 2,597 | 2,479 | -5% | 1 | 1 | 0% | 486 | 3,109 | +540% | 0 | 0 | — |
case-03 | pass→pass | 8,184 | 3,711 | -55% | 1 | 1 | 0% | 1,512 | 3,330 | +120% | 0 | 0 | — |
case-04 | pass→pass | 10,085 | 5,290 | -48% | 1 | 1 | 0% | 1,865 | 3,655 | +96% | 0 | 0 | — |
case-05 | pass→pass | 5,596 | 2,525 | -55% | 1 | 1 | 0% | 1,079 | 3,111 | +188% | 0 | 0 | — |
case-06 | pass→pass | 6,019 | 2,551 | -58% | 1 | 1 | 0% | 1,276 | 3,143 | +146% | 0 | 0 | — |
case-07 | pass→pass | 6,805 | 2,874 | -58% | 1 | 1 | 0% | 1,314 | 3,208 | +144% | 0 | 0 | — |
case-08 | pass→pass | 5,384 | 2,249 | -58% | 1 | 1 | 0% | 999 | 3,082 | +209% | 0 | 0 | — |
case-09 | pass→pass | 7,565 | 2,897 | -62% | 1 | 1 | 0% | 1,413 | 3,195 | +126% | 0 | 0 | — |
case-10 | pass→pass | 7,172 | 2,706 | -62% | 1 | 1 | 0% | 1,413 | 3,088 | +119% | 0 | 0 | — |
case-11 | pass→pass | 7,050 | 2,201 | -69% | 1 | 1 | 0% | 1,397 | 3,130 | +124% | 0 | 0 | — |
case-12 | pass→pass | 3,941 | 2,624 | -33% | 1 | 1 | 0% | 739 | 3,145 | +326% | 0 | 0 | — |
case-13 | pass→pass | 5,112 | 2,269 | -56% | 1 | 1 | 0% | 922 | 3,064 | +232% | 0 | 0 | — |
case-14 | pass→pass | 2,573 | 2,916 | +13% | 1 | 1 | 0% | 403 | 3,000 | +644% | 0 | 0 | — |
case-15 | pass→pass | 4,822 | 3,594 | -25% | 1 | 1 | 0% | 964 | 3,208 | +233% | 0 | 0 | — |
case-16 | pass→pass | 4,479 | 1,894 | -58% | 1 | 1 | 0% | 947 | 2,926 | +209% | 0 | 0 | — |
case-17 | pass→pass | 3,494 | 2,071 | -41% | 1 | 1 | 0% | 728 | 3,065 | +321% | 0 | 0 | — |
case-18 | pass→pass | 3,380 | 1,646 | -51% | 1 | 1 | 0% | 674 | 2,949 | +338% | 0 | 0 | — |
case-19 | pass→pass | 3,446 | 2,726 | -21% | 1 | 1 | 0% | 648 | 3,029 | +367% | 0 | 0 | — |
case-20 | pass→pass | 2,435 | 2,175 | -11% | 1 | 1 | 0% | 475 | 2,985 | +528% | 0 | 0 | — |
case-21 | fail→pass | 14,582 | 5,391 | -63% | 1 | 1 | 0% | 2,768 | 3,607 | +30% | 0 | 0 | — |
case-22 | pass→pass | 3,917 | 1,525 | -61% | 1 | 1 | 0% | 827 | 2,930 | +254% | 0 | 0 | — |
case-23 | pass→pass | 2,666 | 3,197 | +20% | 1 | 1 | 0% | 429 | 3,283 | +665% | 0 | 0 | — |
case-24 | pass→pass | 5,034 | 3,310 | -34% | 1 | 1 | 0% | 982 | 3,221 | +228% | 0 | 0 | — |
case-25 | pass→pass | 4,633 | 3,285 | -29% | 1 | 1 | 0% | 949 | 3,278 | +245% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted. The headline lift of +4 percentage points is the difference between those two pass rates over the 25 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.