branchprune
v1.0.0
Published
Zero-config safe git branch cleanup — remove merged branches in seconds
Maintainers
Readme
branchprune
Zero-config safe git branch cleanup — remove merged branches in seconds.
Install
npx branchpruneOr install globally:
npm i -g branchpruneUsage
# List merged branches, prompt to delete
branchprune
# Preview only, no deletions
branchprune --dry-run
# Also clean up remote-tracking branches
branchprune --remote
# Skip confirmation prompt
branchprune --force
# Combine flags
branchprune --remote --dry-runFeatures
- Zero config — auto-detects default branch (main/master)
- Safe by default — protects main, master, develop, and your current branch
- Interactive — review and select which branches to delete
- Colored output — clear terminal display with summary
- Remote support — clean up stale remote branches too
How it works
- Detects your default branch (main or master)
- Lists all branches merged into it
- Filters out protected branches
- Prompts you to confirm before deleting
- Cleans up with a summary
License
MIT
