fix(merge): push restacked branches after each stack merge step#20
Merged
Conversation
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 changed
After each successful
ez merge(single PR or each step ofez merge --stack), any branch that was restacked locally isgit fetch+git push --force-with-lease’d so GitHub’s PR head matches the rebased commits before the next merge runs. That fixes stack merges failing on the next PR with merge conflicts until you manually ranez restackand force‑pushed.Merge receipts JSON now include
restackedandpushed_branchesper step.ez merge --helpdoc line notes the push behavior.Example:
ez merge --stack --yesStack
feat/authmainfeat/apifeat/authfeat/uifeat/apiRun from tip (or any branch in the line):
ezmerges bottom → top:[feat/auth, feat/api, feat/ui].Round 1 (#180)
main, trygh pr edit --base mainfor child PRs.git fetch.parent_headis stale (e.g.feat/api,feat/uionto updatedmain).--force-with-lease).Round 2 (#181) — same pattern; push restacked dependents (e.g.
feat/ui) so PR #182 is mergeable.Round 3 (#182) — merge last PR; restack/push if anything still moved.
Single PR
Merges only the stack bottom PR for your current line; the global restack + push loop still runs afterward so dependents stay aligned with trunk.
--methodis GitHub’smerge_method:squash(default),merge, orrebase.