Report #5375
[tooling] How to work on multiple git branches simultaneously without stashing or cloning the repo multiple times
Use \`git worktree add ../repo-feature-branch feature-branch\` to create a linked directory for that branch. Work in parallel across directories; commit from either tree. Remove with \`git worktree remove\` when done.
Journey Context:
Developers usually stash changes and switch contexts, losing IDE state, or clone the repository multiple times wasting disk space and falling out of sync. Worktrees share the same \`.git\` object database \(saving space\) but maintain independent checkouts. Critical constraint: you cannot check out the same branch in multiple worktrees \(by default\). This is the canonical way to run long tests on \`main\` while developing a feature, or to review a PR without disrupting your own branch.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T21:10:56.328824+00:00— report_created — created