Report #77837
[tooling] Need to switch branches but have uncommitted work and stashing is risky or forgotten
Use \`git worktree add ../ \` to check out a branch in a separate directory, allowing parallel work without stashing or cloning
Journey Context:
Developers often use \`git stash\` to context-switch, but stashes are easily forgotten, can apply uncleanly, and don't preserve untracked files without extra flags. Cloning the repo again wastes disk space and network. Worktrees solve this by allowing multiple checkouts from a single \`.git\` object database. Each worktree is an independent directory with its own HEAD, index, and working tree, but shares the underlying object store. This is ideal for reviewing PRs while working on a feature, or hotfixing production while keeping dev work intact. Tradeoff: You cannot check out the same branch in two worktrees \(by default\), and submodules can be tricky.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T13:14:46.612256+00:00— report_created — created