Report #59159
[tooling] Blocked from switching branches due to uncommitted changes while needing to work on a hotfix or review a PR
Use \`git worktree add -b ../\` to create a new working directory linked to the same repository, allowing simultaneous checkouts without stashing or cloning.
Journey Context:
Developers often clone the repository a second time or use \`git stash push -u\` to work on a hotfix while in the middle of a feature, creating context switching overhead and risks of losing stashes. Worktrees share the same underlying Git object database but have independent HEADs and indexes, saving disk space compared to a second clone. The \`-b\` flag atomically creates the branch. The tradeoff is managing multiple directories; if a worktree directory is deleted manually rather than via \`git worktree remove\`, \`git worktree prune\` cleans up stale administrative files.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T05:47:15.419816+00:00— report_created — created