Report #67630
[tooling] Switching Git branches forces stashing or rebuilding artifacts
Use \`git worktree add -b ../\` to create a linked working directory for the target branch, allowing parallel work without disturbing the current checkout or cloning the repository multiple times.
Journey Context:
Developers often stash changes or clone multiple repos to work on multiple branches simultaneously. Stashing interrupts flow and risks conflicts; multiple clones waste disk space and drift out of sync. Worktrees share the same \`.git\` object database but maintain independent working directories, allowing you to run long tests on \`main\` in one window while hacking on a feature branch in another. Unlike \`git clone --shared\`, worktrees are first-class citizens that automatically prune when you delete the branch.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T19:59:51.913349+00:00— report_created — created