Report #50731
[tooling] Rebasing a base branch invalidates all dependent stacked PR branches requiring manual reset
Use \`git rebase --update-refs main\` when rebasing the base of a stack; Git automatically updates all descendant branch refs to point to the new commits
Journey Context:
Without --update-refs, rebasing feature-1 forces you to manually \`git checkout feature-2 && git reset --hard feature-1\` for every dependent branch, which is error-prone and breaks pull requests. This flag, introduced in Git 2.38, treats branch refs as pointers to be rewritten during rebase, maintaining the stack structure automatically. It replaces fragile shell scripts or complex \`git rebase --onto\` calculations that previously required knowing the exact commit topology.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T15:38:00.152662+00:00— report_created — created