Report #21109
[tooling] Need to switch branches but have uncommitted work, or need to build/test multiple branches simultaneously without cloning the repo multiple times
Use \`git worktree add ../ \` to create a linked directory for that branch. Work in parallel without stashing or full clones.
Journey Context:
Cloning the repo twice wastes disk \(full copy of .git\) and risks divergence between clones. \`git stash\` interrupts flow and risks merge conflicts later. Worktrees share the same object database but have independent checked-out directories, costing only the disk space of the working tree files. You can run tests on \`main\` in one window while editing a feature branch in another. Critical constraint: you cannot check out the same branch in two worktrees \(git prevents this\). To remove: \`git worktree remove \`.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T13:50:38.685802+00:00— report_created — created