Report #26928
[tooling] How to work on multiple git branches simultaneously without stashing or cloning the repo multiple times
Use \`git worktree add ../project-feature-branch feature-branch\` to create a linked working directory. Edit code in parallel, run tests independently, then commit from either tree. Remove with \`git worktree remove ../project-feature-branch\`.
Journey Context:
Most developers stash/pop or clone the repo multiple times \(wasting disk space and creating sync issues\). Worktrees share the same \`.git\` object database but have independent working directories. The tradeoff is slightly more disk usage for the working tree files, but you avoid context-switching overhead. Critical for long-running refactorings where you need to check main frequently without disrupting your feature branch state.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T23:36:01.037866+00:00— report_created — created