Using git notes to easily share my TODO list Link to heading

I’ve started developing on my tablet. It comes with its own set of challenges. But writing TODOs is something I found a really nice workflow for!

Git has git notes that can attach a user-written note to any object, and then push that to the repo.

So create a tag called todo with:

git tag todo
git push --tags

Now everyone that pulls will (with default settings) download that tag.

Next, you need to force everyone to download the latest notes. With git config we can set a local configuration that does just this. In FFS this is just what I do in my dev container setup.

#!/bin/bash

# Set global Git aliases
git config --local alias.st status
git config --local alias.co checkout
git config --local alias.br branch
git config --local alias.ci commit
git config --local alias.last "log -1 HEAD"

echo "✅ Git aliases set."

# Set default behaviour for push/pull
if ! grep -q "refs/tags/*" ".git/config"; then
    git config --local --add remote.origin.push 'HEAD'
    git config --local --add remote.origin.push 'refs/tags/*'
    git config --local --add remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'
    git config --local --add remote.origin.fetch '+refs/tags/*:refs/tags/*'
    echo "✅ Git default push/pull mode set."
else
    echo "✅ Git default push/pull mode already set!"
fi

# Automatically push and fetch notes for TODOs
if ! grep -q "refs/notes/*" ".git/config"; then
    git config --local --add remote.origin.push 'refs/notes/*'
    git config --local --add remote.origin.fetch '+refs/notes/*:refs/notes/*'
    echo "✅ Git notes sync set."
else
    echo "✅ Git notes seem to already be set up for sync!"
fi

Now that refs/notes/* are automatically pulled and pushed we just need to run git notes edit todo to access our todo list in our configured editor.

In FFS I created a CLI alias with todo that is automatically registered on startup. So all I have to do is type todo and ENTER.

This setup for git notes makes it easy for me to go between my workstation and tablet when coding, and when opening FFS in a Github Codespace on the tablet I will automatically sync my todo list. As a bonus, I don’t have to have an ugly todo.md that greets anyone, and I am not forcing myself to use a different tool than what is already necessary for developing FFS.