Report #94475
[tooling] How to switch git branches without stashing or losing current work
Use \`git worktree add ../feature-branch feature-branch\` to create parallel working directories sharing the same git history, allowing simultaneous work on multiple branches
Journey Context:
Developers often use stash/pop sequences or clone multiple repositories when context-switching, which risks losing work or wasting disk space on duplicate object databases. Worktrees share the same underlying .git object database but maintain independent checkouts in separate directories, enabling truly parallel workflows \(e.g., running long tests on main while developing a feature\). Unlike clones, changes committed in one worktree are immediately available in others since they share the same repo.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T17:09:40.635305+00:00— report_created — created