203 private links
Notes stow metadata about anything tracked by git—any object: commits, blobs, and trees.
The git project itself offers an example of git notes in the wild. They link each commit to its discussion on their mailing list.
Other folks are using notes for things like:
- Tracking time spent per commit or branch
- Adding review and testing information to git log
- And even fully distributed code review
Review notes are used by Gerrit (Wikimedia) and many google projects. For example:
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
There is also an extension from Google to git notes dedicated to code review: https://github.com/google/git-appraise. Request review, comment and review and merge are included.
Its authors have declared it a “fully distributed code review”—independent of GitHub, GitLab, or any other code forge.
Git notes are however a pain to use. Mhmhmhm #idea #project on top of the git note commands?
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.
Much of the value of git repos ends up locked into forges, like GitHub. Git notes are a path toward an alternative and it could make it possible to distribute the history of an entire project.