
Git worktree – the underrated superpower of Git
Git worktrees have existed since 2015 (Git 2.5). Yet in Germany, estimates suggest only about 5–10% of developers actually use them – surprisingly few, considering how much time they save and how much clearer they make working with multiple branches.
Quick disclaimer upfront:
If you mainly use Git for small hobby projects or still work in the “2010 style” (checkout → commit → push → done), worktrees probably aren’t interesting for you.
But if you work professionally in teams, deal with lots of branches and merge requests, develop long-running features, or regularly do code reviews – then git worktree will noticeably improve your daily life.
What problem does git worktree actually solve?
The classic situation: You’re deep in focus on a feature. Suddenly a critical merge-request review comes in or you need to check something in another branch. What happens next?
- You stash your current work (hopefully without forgetting anything)
- Switch to the other branch
- Look at the code
- Switch back, pop the stash
- Hope nothing broke
That’s annoying, error-prone, and above all: you cannot see both states at the same time, compare them, test them side by side, or debug them together.
Git worktree solves exactly that: it checks out any branch (or commit) into a separate folder – without disturbing your current work. Suddenly you have multiple full working copies of the same repository open in parallel, all sharing the same .git folder.
Two battle-tested organization methods
So you can get started right away without creating chaos, here are two proven structures:
Method 1: “Base + sibling worktrees” (my personal favorite for most projects)
1USES-DEV/2├── base/ # your main checkout (usually main or develop)3├── worktree-payments/ # feature branch “payments”4├── worktree-ui-redesign/5├── worktree-bug-123/6└── docs/ # or other project-related foldersHow to get started:
Advantage: Everything visually belongs together, navigation stays simple, adding ../worktree-* to .gitignore protects against accidents.
Method 2: Bare clone + clean source folders (very clean for power users)
1USES-DEV/2├── .bare/ # only the Git data (git clone --bare)3├── base/ # main branch4├── payments/5├── ui-redesign/6└── bug-123/Setup:
1mkdir USES-DEV2cd USES-DEV3git clone --bare [email protected]:yourname/uses-dev.git .bare4echo "gitdir: .bare" > .git # trick so normal git commands work5git worktree add base main6git worktree add payments feature/paymentsAdvantage: Very clean separation (no hidden .git inside working folders), fetch/pull in one worktree updates everything instantly.
Conclusion
Git worktree isn’t a nice gimmick – it’s a real productivity weapon once you juggle more than one or two branches at a time. Especially when combined with modern tools like Claude Code (which automatically creates worktrees for agents), it unfolds its full power.
Try one of the two structures – you’ll be up and running in 10 minutes. And the next time you reach for `git stash` just to switch branches… you’ll know you’ve been missing out.
Have you already tried worktrees – or are you still stashing like it’s 2010?
Feel free to leave a comment or tag me on LinkedIn/X – I’m curious about your experiences!