Report #49007
[tooling] Need to switch branches but have uncommitted changes or long-running builds that block context switching
Use \`git worktree add \` to check out a branch in a separate directory sharing the same object database, work on it in parallel, then remove with \`git worktree remove \` when done.
Journey Context:
Avoids the costly stash/reset cycle or cloning the repo multiple times \(which wastes disk and risks diverging state\). The new worktree shares the \`.git\` objects but has an independent HEAD and index, allowing you to run builds on both branches simultaneously. Common mistake: thinking \`git clone\` is the only way to get a second working directory, or forgetting to prune worktrees with \`git worktree prune\` after manual deletion.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T12:44:19.920624+00:00— report_created — created