PocketBill Blog
A project with nine broken modules, and one folder per module. On Git worktrees, the guardrail that keeps them honest, and the single shared file that parallelism does not fix.
For a while my project had nine things wrong with it at once: a dashboard that would not load, a risk panel, a monitor, a backtest engine, a scheduler. Nine modules, nine separate repairs, and one folder to do them in.
That one folder was the problem. Every half-finished fix was a toll gate. If I was halfway through the trade screen and noticed the risk panel was wrong, I had two options: stash the trade work, or finish it first. So I mostly did neither. I wrote the second thing down on a list and kept going on the first, which is a polite way of saying the risk panel stayed broken for three weeks.
Then I put each module in its own directory — nine folders side by side, all the same project, each on its own branch. Not nine copies. One repository, checked out in nine places at the same time. Nothing about my typing got faster. What changed is that the risk panel stopped waiting for the trade screen.
There is a constraint worth knowing before you try this: the same branch cannot be checked out in two folders at once. That reads like a limitation. It is the guardrail. It means one line of work lives in exactly one place, so two windows can never quietly edit the same branch and diverge.
Commits made inside a worktree land on that worktree's branch directly. There is no extra push, no copying between folders. The only thing that moves is your attention.
Parallel folders do not remove the shared surface. The guide says it plainly: if two modules touch the same file — a router, in this case — merging means resolving the conflict by hand. Nine independent directories, and every one of them still wants a piece of the same file.
So the discipline is not about working faster. It is about the order: test inside the worktree, merge to main only after that, then remove the folder and delete the branch. Merging two unfinished branches to save time just moves the collision to a place where it is harder to see.
I build a second thing, and it is designed in the opposite direction. PocketBill is the expense and subscription tracker I use: no account, works offline, and there is exactly one copy of your ledger, on your device. It will not sync it anywhere.
Nine copies are wonderful for building. For money they are a disaster. Two ledgers that disagree are worse than one ledger that is a day behind, because you can no longer tell which number is real.
Worktrees taught me a question I now ask about everything: not how many copies can I have, but do I know where each copy is, and which one is the truth.