the short of it is: they’re cool for appending notes from automated systems (like ticket or build systems) but not really for having interactive conversations with other developers (at least not yet)
The command above shows me all the standard git log info alongside information about what tests ran and who reviewed the code. All without forcing me into my browser.
commit d1d17908d2a97f057887a4afbd99f6c40be56849
Author: User <user@example.com>
Date: Sun Mar 27 18:10:51 2022 +0200
Change the thing
Notes (review):
Verified+1: SonarQube Bot
Verified+2: jenkins-bot
Code-Review+2: Reviewer Human <reviewerhuman@wikimedia.org>
Submitted-by: jenkins-bot
Submitted-at: Tue, 14 Jun 2022 21:59:58 +0000
Reviewed-on: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/774005
Project: mediawiki/core
Branch: refs/heads/master
💠 Distributed code review inside git notes
Motivated hackers can knead and extend git notes. Using them as distributed storage for any madcap idea.
Someone at Google cobbled together a full-on code review system teetering atop git notes called git-appraise.
Its authors have declared it a “fully distributed code review”—independent of GitHub, GitLab, or any other code forge.
This system lets you:
Request review of a change
Comment on a change
Review and merge a change
And you can do all this from your local computer, even if GitHub is down.
Plus, it’s equipped with an affectedly unaesthetic web interface, if that’s your thing.
For commits, you can make viewing and adding notes easier using fancy options in your gitconfig3. But for storing notes about blobs or trees? Forget it. You’d need to be comfortable rooting around in git’s plumbing first.
So, for now: git notes are relegated to obscurity. Forever hamstrung by an obscure and clunky interface and limited adoption—I often forget they’re there.
🗽 Forge independence
Git is a distributed code review system. But much of the value of git repos ends up locked into forges, like GitHub.
Git notes are a path toward an alternative.
Git distributes the history of a piece of code. Git notes could make it possible to distribute the history of an entire project.