Git Notes as a Tool for Thought
Published ....
Last modified ....
Share this post on BlueskySee discussion on Bluesky
While flying back out to the west coast for a week and a half "workation" - I stumbled across a brief tweet talking about git-notes. For those that don't know (and don't care to read through Git docs), git notes is a way to track additional free form content associated with commits, without editing/amending the underlying commit. From what I can tell - these are tracked separately from commits, but Git knows how to connect them behind the scenes.
While there's been other great blog posts about git notes (like this one that I recommend checking out), I wanted to write a bit about a failed idea to use this little used feature as a way to store a daily journal of sorts.
The rough idea was:
- Create a single commit for each day (formatted nicely)
- Append notes to that commit through out the day (as you see fit)
- Each of the appended notes stashes the time at which the note was added, e.g.
9:15AM ET
And that's it! Plain and simple!
I was able to stub out a quick and very dirty Bun-flavored JavaScript snippet that could expose a simple CLI to manage these notes:
// bun note.ts "something"
// bun note.ts show
import { readableStreamToText