From dd2a46191d7b87ed7e3ad959f33e34892dc0bcab Mon Sep 17 00:00:00 2001 From: Baptiste LAFOURCADE Date: Fri, 11 Sep 2026 05:53:39 +0200 Subject: [PATCH] docs(vcs): merging a stacked pull request without closing it GitHub closes a pull request whose base branch is deleted, unless the merge itself deletes it. Deleting the base of #819 through the API after #818 merged closed #819 instead of retargeting it. `vcs.md` now says to retarget first, and how to replay a dependent branch after its base was squashed. Fixes #843 Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_011x4ms5qcGuZgYhCxfdHMUb AIDD-Session-Id: 4acc9a1c-19bc-4468-b8b6-e86644bcba60 --- aidd_docs/memory/vcs.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aidd_docs/memory/vcs.md b/aidd_docs/memory/vcs.md index 0b2387385..2f43a52a0 100644 --- a/aidd_docs/memory/vcs.md +++ b/aidd_docs/memory/vcs.md @@ -32,6 +32,11 @@ The version-control conventions this project follows: branches, commits, and the - The board does not advance on its own; it is moved by hand, by a human or an agent through `gh`. Board conventions are in `backlog.md`. - Automation owns `promote/*` and `back-merge/*`, which follow neither the format nor the table. +## Pull requests + +- A pull request stacked on another targets that branch, not `next`. Before merging the base, retarget the dependent one: `gh pr edit --base next`. GitHub closes a pull request whose base branch is deleted, unless the deletion is the merge's own, so never delete a branch another open pull request targets. +- A squash merge of the base leaves the dependent branch carrying the base's original commits, and it conflicts with `next`. Replay only its own commits: `git rebase --onto origin/next `, then push with `--force-with-lease`. + ## Commits - Convention: [Conventional Commits](https://www.conventionalcommits.org/), enforced by `commitlint.config.cjs`. **Read that file before composing a message; if this page and the config disagree, the config wins.**