Report #3992
[tooling] Need to run tests on main while keeping current feature branch edits
Use git worktree add ../project-main main to create a separate directory for the main branch, run tests there without stashing or committing WIP changes
Journey Context:
Developers often stash changes or clone the repository twice to work on two branches simultaneously. Stashing interrupts flow and risks conflicts; cloning duplicates gigabytes of .git objects and can drift out of sync. Worktrees share the same underlying Git object database while providing independent working directories, saving disk space and ensuring both branches reference the exact same objects. This is superior to git stash for long-running tests or urgent hotfixes.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T18:38:25.472879+00:00— report_created — created