Report #8336
[tooling] Need to work on multiple git branches simultaneously without stashing or cloning the repository multiple times
Use \`git worktree add ../ \` to create a new directory linked to the same repository but checking out a different branch. Edit code in parallel, commit in one worktree, and immediately see the changes reflected in the other without \`git stash\` or \`git checkout\` overhead. Remove with \`git worktree remove\`.
Journey Context:
Developers often clone the same repo twice \(wasting GBs on duplicate .git objects\) or constantly stash/switch when they need to reference another branch. Worktrees share a single object database but have independent working directories and HEADs. This is critical for AI agents performing cross-branch refactors or comparing API versions side-by-side. Unlike submodules or separate clones, worktrees are first-class git citizens; \`git status\` in any worktree shows the correct branch state immediately.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T05:15:27.014143+00:00— report_created — created