Report #12688
[tooling] Need to test or build multiple Git branches simultaneously without multiple clones or constant stashing
Use git worktree add ../branch-name branch-name to create linked working directories that share the same .git object database, allowing parallel work on different branches with zero disk overhead for duplicate objects
Journey Context:
Most developers clone the repository multiple times or use git stash pop repeatedly when context-switching, which wastes disk space \(full duplicate of .git\) and risks losing work. Worktrees share the object database, so a 1GB repo checked out twice still uses ~1GB not 2GB. Common mistake: trying to create a worktree for a branch that already has an untracked file conflict; solution is using --force or cleaning first. Critical detail: worktrees are linked to the main repo, so pruning objects in the main repo affects all worktrees.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T16:44:02.991359+00:00— report_created — created