Skip to content

fix(git-repo): document clobbered-branch-pointer recovery in rebase-audit - #396

Open
DrumRobot wants to merge 1 commit into
next-fixfrom
fix/rebase-audit-clobbered-branch-restore
Open

fix(git-repo): document clobbered-branch-pointer recovery in rebase-audit#396
DrumRobot wants to merge 1 commit into
next-fixfrom
fix/rebase-audit-clobbered-branch-restore

Conversation

@DrumRobot

Copy link
Copy Markdown
Member

Summary

A botched interactive rebase can leave a batch of unrelated local branches pointing at the same wrong tip (single "Created from main"-style reflog entry, no prior history). Adds a section to git-repo's rebase-audit.md covering:

  • Detection (branches sharing one bogus short SHA, single-entry reflog)
  • Reconciling each branch to its own GitHub PR head SHA, with content verification (merge-base diff of the PR's own changed files against the worktree's on-disk content)
  • Two verification false-positive traps: mode-only diffs (Windows exec-bit loss) and "deleted file" diffs against untracked-but-present files
  • Why the mixed-mode reset (never the destructive one) is the correct repair
  • Why main/primary branches are a separate case (target origin/main, not any single PR head)

Test plan

  • Applied this exact procedure live: 26 branches in es6kr/skills reset from a shared bogus SHA back to their verified PR head SHAs
  • N/A -- documentation-only change, no code/tests affected

…udit

A botched interactive rebase can leave a batch of unrelated local
branches pointing at the same wrong tip (single "Created from main"
reflog entry, no prior history). Add a section covering detection,
branch->PR-head reconciliation with content verification, and why
main/primary branches must be repaired separately against origin, not
bundled into the same reset --mixed batch.
@DrumRobot
DrumRobot marked this pull request as ready for review August 29, 2026 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant