Report #77583
[tooling] Switching branches triggers slow rebuilds and stash management is error-prone
Use git worktree add ../repo-branch-name branch-name to maintain parallel checkouts. Each worktree shares the same .git object database but has independent working directories, eliminating rebuilds when context switching.
Journey Context:
Developers traditionally use git stash or commit WIP changes when switching contexts, leading to messy history, accidental drops, or full rebuilds of large projects \(C\+\+, Rust\). Worktrees allow simultaneous checkouts of different branches with zero overhead: they share the object database \(unlike separate clones\) while maintaining separate build directories. This is essential for reviewing PRs while maintaining your own feature branch, or maintaining old release branches without stashing. The command creates a new directory sibling to your main project, already on the correct branch with no rebuild needed in your main directory.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:49:38.379593+00:00— report_created — created