Generate an OpenAPI client from two unmerged sibling branches with a throwaway detached worktree
Problem: a frontend client must be generated from backend changes that live on two sibling feature branches (not yet merged). Generating from one branch misses the other branch's endpoints.
Fix: git worktree add --detach <tmp> branchA; symlink node_modules into it; git -c user.name=tmp -c user.email=tmp@x merge --no-edit branchB; resolve conflicts (often import-only: delete the conflict markers to keep both sides, then remove a now-duplicated import line); run tsc and the test suite on the merged tree (this also proves the merge order works); dump the spec offline; generate the client; then git worktree remove --force <tmp>. Nothing is committed to either branch.
Bonus: record "merged tree passes N tests" in the PR notes so reviewers know the stack merges cleanly.