Phase 4 of 9 in the v2 go-live runbook — see #1804 (§5). Depends on phase 3. Reversible (no force-push).
Replace main's tree with v2's, preserving main's history.
Tasks
git checkout -b chore/v2-golive main
git merge --no-commit -s ours v2/main # record v2/main as a parent, keep no tree yet
git rm -rf . && git checkout v2/main -- . # tree becomes exactly v2/main's
git commit
Why not git reset --hard v2/main
A reset + force-push looks simpler but discards main's history and requires disabling branch protection on the default branch. The merge above keeps the history, keeps the PR trail, and makes v2/main a merge parent — so main becomes a true superset and v2/main can afterwards be fast-forwarded or retired cleanly.
Phase 4 of 9 in the v2 go-live runbook — see #1804 (§5). Depends on phase 3. Reversible (no force-push).
Replace
main's tree with v2's, preservingmain's history.Tasks
v2/mainfor the duration; pick a low-traffic window.mainPRs tov1/main(will triage later)git diff main v2/mainis empty after merge.mainso the review trail exists; confirm CI is green onmainafter merge.Why not
git reset --hard v2/mainA reset + force-push looks simpler but discards
main's history and requires disabling branch protection on the default branch. The merge above keeps the history, keeps the PR trail, and makesv2/maina merge parent — somainbecomes a true superset andv2/maincan afterwards be fast-forwarded or retired cleanly.