chore: prune 24 stale remote feature branches #167

Open
opened 2026-08-09 03:48:20 +02:00 by clawbot · 0 comments
Collaborator

Problem

origin carries 26 branches. Excluding main, 24 are stale feature branches
from already-landed work:

chore/token-list-enrichment
feat/issue-131-transaction-view-layout
feat/message-signing
feature/82-warn-new-address
feature/82-zero-history-warning
feature/copy-flash-feedback
feature/expanded-warnings
feature/issue-82-new-address-warning
feature/show-private-key
fix/116-timestamps-include-timezone
fix/55-swap-show-own-address
fix/59-transaction-view-ui-policies
fix/70-confirm-tx-contract-display
fix/77-confirm-tx-persist
fix/87-consistent-error-display
fix/87-consistent-error-display-v2
fix/99-block-number-clickable
fix/consistent-error-display
fix/cross-wallet-duplicate-detection
fix/issue-58-receive-address-consistency
fix/issue-72-address-token-tx-history
fix/issue-99-block-number-link-copy
issue-99-block-number-external-link
issue-99-block-number-styling

TODO.md:51-52 already carries this as a Future Step.

The catch — do not use --merged

git branch -r --merged origin/main reports zero merged branches, because
PRs in this repo are squash-merged: the branch tip is never an ancestor of
main. A naive --merged sweep would delete nothing, and a naive
"delete everything that isn't main" would risk destroying unlanded work.

Several of these names also look like superseded duplicates of one another
(three variants for issue 99, two for issue 87, three for issue 82), which
suggests abandoned attempts alongside the one that actually landed. Those still
need checking rather than assuming.

Implementation requirements

  • For each branch, determine whether its content actually landed on main.
    Squash-merges mean you must compare content, not ancestry. Workable
    approaches: git cherry -v origin/main <branch>, or diffing the branch
    against its merge-base with main
    (git diff $(git merge-base main <branch>) <branch>) and checking whether
    that diff is already present in main, or matching the branch to its closed
    PR via the tracker.
  • Cross-reference the tracker: most of these map to a numbered issue/PR that is
    closed and merged. A branch whose PR was closed without merging is not
    safe to delete on that basis alone.
  • Produce a written classification of all 24 before deleting anything: landed
    (safe), superseded duplicate (safe, name the branch that won), or
    unlanded (do not delete).
  • Anything unlanded or ambiguous stays, and gets listed in the PR/issue comment
    so it can be triaged separately. Do not guess.
  • Delete only on origin, and only after the classification is posted here.
    Local branches in the shared clone are already down to main alone.
  • Do not touch main, and do not force-push anything.

Definition of done

  • A comment on this issue classifies all 24 branches as landed, superseded,
    or unlanded, with the evidence used for each.
  • Every branch classified landed or superseded is deleted from origin.
  • Every branch classified unlanded still exists and is listed for triage.
  • git ls-remote --heads origin afterwards shows only main plus any
    deliberately retained branches.
  • TODO.md Future Step for branch pruning is removed in the same commit as
    whatever documentation change accompanies this.
## Problem `origin` carries 26 branches. Excluding `main`, 24 are stale feature branches from already-landed work: ``` chore/token-list-enrichment feat/issue-131-transaction-view-layout feat/message-signing feature/82-warn-new-address feature/82-zero-history-warning feature/copy-flash-feedback feature/expanded-warnings feature/issue-82-new-address-warning feature/show-private-key fix/116-timestamps-include-timezone fix/55-swap-show-own-address fix/59-transaction-view-ui-policies fix/70-confirm-tx-contract-display fix/77-confirm-tx-persist fix/87-consistent-error-display fix/87-consistent-error-display-v2 fix/99-block-number-clickable fix/consistent-error-display fix/cross-wallet-duplicate-detection fix/issue-58-receive-address-consistency fix/issue-72-address-token-tx-history fix/issue-99-block-number-link-copy issue-99-block-number-external-link issue-99-block-number-styling ``` `TODO.md:51-52` already carries this as a Future Step. ## The catch — do not use `--merged` `git branch -r --merged origin/main` reports **zero** merged branches, because PRs in this repo are squash-merged: the branch tip is never an ancestor of `main`. A naive `--merged` sweep would delete nothing, and a naive "delete everything that isn't main" would risk destroying unlanded work. Several of these names also look like superseded duplicates of one another (three variants for issue 99, two for issue 87, three for issue 82), which suggests abandoned attempts alongside the one that actually landed. Those still need checking rather than assuming. ## Implementation requirements - For **each** branch, determine whether its content actually landed on `main`. Squash-merges mean you must compare content, not ancestry. Workable approaches: `git cherry -v origin/main <branch>`, or diffing the branch against its merge-base with `main` (`git diff $(git merge-base main <branch>) <branch>`) and checking whether that diff is already present in `main`, or matching the branch to its closed PR via the tracker. - Cross-reference the tracker: most of these map to a numbered issue/PR that is closed and merged. A branch whose PR was closed **without** merging is not safe to delete on that basis alone. - Produce a written classification of all 24 before deleting anything: landed (safe), superseded duplicate (safe, name the branch that won), or **unlanded** (do not delete). - Anything unlanded or ambiguous stays, and gets listed in the PR/issue comment so it can be triaged separately. Do not guess. - Delete only on `origin`, and only after the classification is posted here. Local branches in the shared clone are already down to `main` alone. - Do not touch `main`, and do not force-push anything. ## Definition of done - [ ] A comment on this issue classifies all 24 branches as landed, superseded, or unlanded, with the evidence used for each. - [ ] Every branch classified landed or superseded is deleted from `origin`. - [ ] Every branch classified unlanded still exists and is listed for triage. - [ ] `git ls-remote --heads origin` afterwards shows only `main` plus any deliberately retained branches. - [ ] `TODO.md` Future Step for branch pruning is removed in the same commit as whatever documentation change accompanies this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#167