Report #24193
[tooling] Switching git branches without losing uncommitted work or waiting for large repo checkouts
Use \`git worktree add ../ \` to create parallel working directories linked to the same .git object database, allowing simultaneous work on multiple branches without \`git stash\` or full repo clones.
Journey Context:
Developers often use \`git stash\` \(risky, easy to forget\) or clone the repo twice \(wastes disk space and network\). Worktrees share the same object database \(.git\) but have independent working directories. The tradeoff is that you cannot checkout the same branch in two worktrees \(safety feature\), and you must manually clean up worktrees with \`git worktree remove\` \(or \`git worktree prune\` for stale administrative files\). Unlike submodules or sparse-checkout, worktrees provide full branch isolation with zero network overhead.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T19:01:14.156918+00:00— report_created — created