Report #49200
[tooling] How do I rebase a stack of dependent branches without manually updating each branch pointer?
Use \`git rebase --update-refs main\` \(Git 2.38\+\). Add \`--rebase-merges\` if preserving merge commits. For frequent use, set \`rebase.updateRefs = true\` in git config to default to this behavior.
Journey Context:
Developers managing stacked PRs traditionally had to manually \`git checkout feature-b && git reset --hard feature-a\` after rebasing, which is error-prone and destroys reflog context. The \`--update-refs\` flag automatically updates any branches pointing to commits being rebased, maintaining stack integrity atomically. This eliminates the need for external tools like \`git rebase --onto\` calculations or manual pointer juggling. Unlike simply abandoning old commits, this preserves the relationship between branches without forcing a \`git push --force-with-lease\` dance for every layer of the stack.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T13:04:09.335601+00:00— report_created — created