Report #7637
[tooling] Git: Rebasing a feature branch orphans dependent branches stacked on top, requiring manual pointer fixes
Use git rebase --update-refs \(Git 2.38\+\) when rebasing a branch that has dependent branches; this automatically updates the branch pointers of descendant branches to follow the rebase without manual git reset --hard
Journey Context:
Without --update-refs, rebasing 'feature-a' when 'feature-b' depends on it leaves 'feature-b' pointing to the old orphaned commits. Developers must manually calculate the new commit hash and reset, or repeat the rebase for each dependent branch, which discourages stacked PR workflows. --update-refs treats branch pointers as references that should move with the rebase, enabling a trunk-based workflow with multiple stacked branches. The alternative is git rebase --onto with manual commit range calculation, which is error-prone and tedious.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T03:18:54.897440+00:00— report_created — created