. If the AI angle in this blog is what hooked you, his guide walks the same arc from daily dev use to coordinating parallel agents, in more depth than I have given it here. One thing I will flag: he recommends nesting worktrees inside a gitignored
.worktrees/ folder at the repo root, which I disagree with for the file-watcher and
rm -rf reasons covered in the rules section above. Take the AI workflow ideas, skip the layout advice.
GitKraken's command walkthrough. The GitKraken page on worktrees is the cleanest "show me add, list, remove" reference I have come across. Skip the GUI parts if you live in the terminal, the command examples stand on their own.
Your own shell history. I am only half joking. After you have used git worktree add a few times, the muscle memory is the best teacher. Add a worktree to a throwaway repo today. Make a branch. Edit a file in it. Look at git worktree list. A few minutes of hands-on beats any blog post, including this one.
If you read just one of these, read the man page. It is genuinely the fastest path from "I have heard of worktrees" to "I cannot believe I lived without these".
The discipline part of the title
I called this a development discipline, not a trick. Let me explain why.
A trick is something you reach for occasionally. A discipline is something you build your workflow around, so that the right thing is also the default thing.
Worktrees only really pay off when you stop thinking of them as a tool for emergencies. They are how you organise simultaneous concerns. Feature in one. Hotfix in another. PR review in a third. AI experiment in a fourth. Each one has a desk. None of them step on the others. The cost of switching is cd, which is the cheapest thing your shell can do.
Once you operate this way, the old stash-checkout-rebase-pop dance starts to feel like something from a different era. Like writing CSS without a preprocessor. Or deploying without containers. The new way is so much calmer that the old way starts to seem actively user-hostile.
That is when I knew it had become a discipline and not a trick. When I stopped reaching for stash. When my default response to an interrupt became "let me spin up a worktree" instead of "let me save what I have in some fragile way I hope I can restore later".
If you take one thing from this blog, take that. Stop stashing. Start worktreeing. Your evenings will thank you.
That is pretty much it from my side today. Let me know what you think, or if you have been through this exact stash-rebase-pop horror and never want to go back to it. Those stories are always the best ones. Catch you in the next blog.