docs(vcs): merging a stacked pull request without closing it - #845
Merged
Conversation
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011x4ms5qcGuZgYhCxfdHMUb AIDD-Session-Id: 4acc9a1c-19bc-4468-b8b6-e86644bcba60
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 What & why
Merging a stack of pull requests closed one by accident (#843). After #818 merged, its branch was deleted through the API. #819 targeted that branch, and GitHub closed it instead of retargeting it: GitHub only retargets when the merge itself deletes the branch. Recovering took recreating the branch at its old SHA, reopening and retargeting #819, then rebasing it, because #818 had been squashed.
🛠️ How it works
A new "Pull requests" section in
aidd_docs/memory/vcs.md:nextbefore merging its base, and never delete a branch another open pull request targets;git rebase --onto origin/next <base's last commit>, then push with--force-with-lease.🧪 How to verify
aidd_docs/memory/vcs.md.pre-commitrunscheck-doc-duplication.js, so no other page restates the rule.🔗 Linked issue
Fixes #843
✅ I certify
🤖 Generated with Claude Code
https://claude.ai/code/session_011x4ms5qcGuZgYhCxfdHMUb