Repository navigation
Record the PR base-oid trap in the stacked-worktree-prs skill - #213
Merged
Merged
Conversation
Splitting settled work out of a long branch and merging it leaves the original PR showing every one of those commits. The existing section covers retargeting a base ref *name*; this is the other half - the name already says `main` while `baseRefOid` stays pinned to the sha main had when the PR was opened, and GitHub does not advance it just because main moved. Measured 2026-08-23: after #211 merged nine commits into main, `git log main..hotfix/easy-to-drive` was two commits while `gh pr diff 208` still listed 29 files and baseRefOid still read 9f8abdb. I told Giles it would clean itself up, which was wrong, and the fix is to read the oid rather than the ref name. Also records the two choices that make the split work at all: `--merge` rather than `--squash`, since a squash shares no history and the base can never advance, and a branch ref at an existing commit rather than a cherry-pick, which rewrites shas and guarantees the same failure. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FYtMwgNNTe2jB2ZLh2nx17
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
One section, from a mistake made today.
Splitting settled work out of a long branch — branch at the last good commit,
PR it, merge it — does not shrink the PR that contained those commits. The
skill already covers retargeting a base ref name when a parent is merged; this
is the other half: the name already says
main, whilebaseRefOidstays pinnedto the sha
mainhad when the PR was opened, and GitHub does not advance itbecause
mainmoved.Measured 2026-08-23: after #211 merged nine commits into
main,git log main..hotfix/easy-to-drivewas the two remaining commits whilegh pr diff 208 --name-onlystill listed 29 files andbaseRefOidstill read9f8abdb. I predicted it would clean itself up, which was wrong — hence thesection.
Also records the two choices that make such a split work at all, both of which
fail silently if got wrong:
--merge, never--squash— a squash creates a new sha with no sharedhistory, so the base can never advance and the split achieves nothing.
git branch <name> <sha>) rather thana cherry-pick, whenever the settled work is a contiguous prefix. Cherry-picking
rewrites shas and guarantees the same failure.
Docs only — no code, no tests affected.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FYtMwgNNTe2jB2ZLh2nx17