Report #96299
[tooling] Need to work on multiple Git branches simultaneously without stashing or cloning the repo multiple times
Use git worktree add to create a linked working tree. Each worktree has its own HEAD and index, allowing simultaneous work on different branches. Remove with git worktree remove .
Journey Context:
Developers often stash changes and switch branches, or clone the repo multiple times \(wasting disk space\). Worktrees allow checking out different branches in separate directories while sharing the same .git object database. This is crucial for long-running tests on one branch while fixing bugs on another. Common mistake: trying to check out the same branch in multiple worktrees \(not allowed by default\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T20:13:27.054814+00:00— report_created — created