Skip to content

Instantly share code, notes, and snippets.

@copyleftdev
Created May 25, 2026 20:20
Show Gist options
  • Select an option

  • Save copyleftdev/673432af6cd251871d4d5979115bd148 to your computer and use it in GitHub Desktop.

Select an option

Save copyleftdev/673432af6cd251871d4d5979115bd148 to your computer and use it in GitHub Desktop.
git notes — annotate commits without touching their SHA
# git notes — attach metadata to commits without rewriting history
# Notes live in refs/notes/commits — the commit SHA never changes.
git notes add -m "Deployed to prod at 14:32 UTC, PLAT-482" HEAD
git notes show HEAD
# See notes inline in git log:
git log --show-notes --oneline -10
# Append to an existing note:
git notes append -m "Rollback window closes 16:00 UTC." HEAD
# Notes don't push by default — explicit push/fetch required:
git push origin refs/notes/commits
git fetch origin refs/notes/commits
# Great for CI/CD: attach build results to a commit without touching its hash.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment