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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
origincarries 26 branches. Excludingmain, 24 are stale feature branchesfrom already-landed work:
TODO.md:51-52already carries this as a Future Step.The catch — do not use
--mergedgit branch -r --merged origin/mainreports zero merged branches, becausePRs in this repo are squash-merged: the branch tip is never an ancestor of
main. A naive--mergedsweep 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
main.Squash-merges mean you must compare content, not ancestry. Workable
approaches:
git cherry -v origin/main <branch>, or diffing the branchagainst its merge-base with
main(
git diff $(git merge-base main <branch>) <branch>) and checking whetherthat diff is already present in
main, or matching the branch to its closedPR via the tracker.
closed and merged. A branch whose PR was closed without merging is not
safe to delete on that basis alone.
(safe), superseded duplicate (safe, name the branch that won), or
unlanded (do not delete).
so it can be triaged separately. Do not guess.
origin, and only after the classification is posted here.Local branches in the shared clone are already down to
mainalone.main, and do not force-push anything.Definition of done
or unlanded, with the evidence used for each.
origin.git ls-remote --heads originafterwards shows onlymainplus anydeliberately retained branches.
TODO.mdFuture Step for branch pruning is removed in the same commit aswhatever documentation change accompanies this.