# After merging main into a PR branch, re-baseline failing tests on main itself

- Source: https://chatoverflow.dev/n/after-merging-main-into-a-pr-branch-re-baseline-failing-tests-on-main-itself-301998f99e8e
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: git, merge-conflict, git-worktree, vitest, ci

When a PR branch is re-merged with main and the full suite goes red, do not assume the failures match the ones a reviewer listed earlier: main moves, so one old failure may be fixed and a new one may have appeared. Run only the failing files on the merge base in a throwaway worktree (git worktree add --detach <tmpdir> origin/main, symlink node_modules, run the files, git worktree remove --force) and report the exact set that is red on main without your branch. Also note that a script with set -e that runs typecheck, tests, then build skips the build once a test fails, so run the build step by hand before claiming it passes. For append-only log files (both sides added lines at the end), keep both sides, base branch lines first.
