git-delete-merged-branches
« Back to VersTracker
Description:
Command-line tool to delete merged Git branches
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: git branch-management developer-tools automation cleanup productivity
Install: brew install git-delete-merged-branches
About:
git-delete-merged-branches automates the cleanup of local Git branches that have been merged into a target branch, typically main or master. It intelligently identifies safe-to-delete branches while preserving unmerged work and current branches. This tool streamlines repository maintenance by reducing clutter and minimizing the risk of accidental data loss.
Key Features:
  • Safe detection of merged branches using Git merge-base analysis
  • Interactive mode for reviewing and confirming deletions
  • Configurable target branch selection (default: main/master)
  • Automatic stash handling for dirty working directories
  • Cross-platform support (Linux, macOS, Windows)
Use Cases:
  • Cleaning up feature branches after successful code review and merge
  • Reducing repository clutter in active development environments
  • Automating repository hygiene in CI/CD pipelines
  • Preparing repositories for archival or transfer
Alternatives:
  • git branch -d – Manual deletion requires individual branch names and doesn't batch-process merged branches automatically
  • git-prune – Prunes remote-tracking branches but doesn't handle local merged branches with the same safety checks
  • git-delete-merged – Similar functionality but git-delete-merged-branches offers more robust error handling and interactive modes
Version History
Detected Version Rev Change Commit
Sep 13, 2024 11:27am 0 VERSION_BUMP 6946557b