Report #74681
[tooling] Switching git branches requires stashing or rebuilding, wasting time on large projects
Use \`git worktree add ../repo-branch-name \` to create a linked working tree; work on multiple branches simultaneously with separate build directories.
Journey Context:
Developers often stash changes and rebuild after switching branches, wasting minutes on large codebases. Worktrees create lightweight linked directories sharing the same object database but with separate HEADs and index files. This preserves build artifacts \(like \`target/\` or \`node\_modules/\`\) per branch and eliminates stash/restore cycles. Unlike cloning the repo multiple times, worktrees share storage and stay in sync automatically.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T07:57:03.708312+00:00— report_created — created