Skip to content

Commit c6f0cf7

Browse files
authored
Merge pull request #5093 from modelcontextprotocol/v2/docs/5092-release-update-branch-warning
docs(release): warn against Update branch on the milestone merge PR
2 parents 5429925 + aa7fa78 commit c6f0cf7

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎.claude/skills/release/SKILL.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,24 @@ squash writes one new commit that `v2/main` does not contain, so the two
258258
branches stop sharing history and the next milestone merge conflicts with
259259
itself.
260260

261+
⚠️ **Do not click "Update branch" on the merge PR.** GitHub always offers it
262+
here, because `main` always holds commits the merge branch lacks (its own
263+
earlier merge commits), so it does not mean the PR is out of date. Clicking it
264+
merges `main` into the merge branch: the PR gains a commit of its own, `main`
265+
receives two merge commits, and the branch head is no longer the commit the
266+
ledger names. If it was clicked, put the branch back on its head from before
267+
the click: the update merge's **first parent**, which is the commit the ledger
268+
verified. Not `origin/v2/main`, which may have moved on to a commit nothing has
269+
verified. Then repeat the `git merge-tree` check above:
270+
271+
```sh
272+
B="v2/chore/$N-release-$MILESTONE"
273+
git fetch origin
274+
UPDATE=$(git rev-parse "origin/$B")
275+
git log -1 --format='%s' "$UPDATE" # must be "Merge branch 'main' into …"
276+
git push --force-with-lease="$B:$UPDATE" origin "$UPDATE^1:refs/heads/$B"
277+
```
278+
261279
⚠️ **Never merge `main` back into `v2/main`** to "sync" them. Everything
262280
reaches `main` through `v2/main`, so there is nothing on `main` to bring back
263281
except the merge commits themselves. `v2/main` ahead of `main` means a release

0 commit comments

Comments
 (0)