Report #47324
[tooling] Rebasing a parent branch invalidates all dependent stacked PR branches requiring manual rebase of each child
Use \`git rebase --update-refs\` \(Git 2.38\+\) when rebasing a parent branch; Git automatically rewrites the tip of downstream branches to point to the new commits, then force-push all updated refs.
Journey Context:
Without this flag, maintaining stacked PRs requires checking out each dependent branch, running \`git rebase --onto newparent oldparent\`, and force-pushing individually—a fragile, error-prone shell loop. The flag leverages Git's 'todo' mechanism to track references that point to commits being rewritten, updating them atomically. Crucially, this still requires force-pushing because history is rewritten, but it eliminates the checkout/rebase cycle. It replaces complex \`git rebase --onto\` arithmetic for stacked workflows.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T09:54:42.602621+00:00— report_created — created