Repository navigation
feat(repo-reset): force-delete verified squash-merged branches - #36
Merged
Merged
Conversation
## What/Why Let repo-reset clean up squash- and rebase-merged branches and their worktrees. Those used to get stuck because `git branch -d` refuses them and the skill banned `-D`. A branch now counts as merged only when a merged PR's head SHA matches its tip, not just its name, and force-deletes need a single batched [Y/n] confirmation. ## Proof it works - markdownlint and the pre-commit hooks pass. - bats tests not run: bats is not installed locally (they only cover reassess; repo-reset has none). - Ran the same verification by hand on a large repo: 8 squash-merged branches matched their merged PR heads exactly and were force-deleted cleanly. ## Risk Medium. The skill can now run `git branch -D`. The SHA match and the per-run confirmation gate it, and dirty worktrees are never touched. ## AI role Claude Opus 5.5 drafted the skill changes from Jason Meridth's direction. Jason set the design (worktrees follow their verified branch, one confirmation prompt) and reviews the change. ## Review focus The ancestor case in step 3 (tip behind the PR head) and the yes/no parsing in step 4. Signed-off-by: jmeridth <jmeridth@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What/Why
repo-reset now cleans up squash- and rebase-merged branches and their worktrees, which used to stay behind because
git branch -drefuses them. A branch only counts as merged when a merged PR's head SHA matches its tip, and force-deletes need one[Y/n]confirmation per run.Proof it works
I ran the same verification by hand on a large repo. 8 squash-merged branches matched their merged PR heads and were force-deleted. The bats suite didn't run because bats isn't installed locally, and it only covers
reassessanyway.Risk
Medium. The skill can now run
git branch -D. The SHA match and the per-run confirmation gate it, and it never touches dirty worktrees.AI role
Claude Opus 5.5 drafted the skill changes. Jason Meridth set the design and reviewed it.
Review focus
The ancestor case in step 3 (local tip behind the PR head) and the yes/no parsing in step 4.