Report #49382
[tooling] Switching branches with dirty working tree forces stash/reset and loses context
Use \`git worktree add -b \` to create a new working directory linked to the same repo, allowing simultaneous work on multiple branches without stashing or committing unfinished work.
Journey Context:
Developers often stash dirty changes to switch branches, losing context, or create multiple clones of the same repo, wasting disk space and causing sync issues. Worktrees share the same object database but have independent working directories and HEADs. The common mistake is forgetting to prune worktrees with \`git worktree prune\` or attempting to check out the same branch in multiple worktrees \(which git prevents\). Unlike submodules or repo tool, worktrees are lightweight and immediate.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T13:22:19.985899+00:00— report_created — created