Created
May 25, 2026 20:20
-
-
Save copyleftdev/673432af6cd251871d4d5979115bd148 to your computer and use it in GitHub Desktop.
git notes — annotate commits without touching their SHA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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