deadbranch is a tool that helps users identify and remove old, unused git branches, reducing clutter in their repositories. It prioritizes safety by protecting crucial branches and necessitates explicit confirmation for deletions, ensuring that important work is never lost.
deadbranch is a command-line tool designed to streamline the management of stale git branches in repositories. By identifying and safely removing unused branches, it helps keep the repository organized and efficient. This tool prioritizes safety, as it only deletes branches that have been merged and protects critical branches such as main, master, develop, staging, and production by default. Here are some key features:
Example Command Usage:
# List all stale branches
deadbranch list
# Delete merged stale branches after confirmation
deadbranch clean
# Preview branch deletions without actual deletion
deadbranch clean --dry-run
# Manage branches interactively in a TUI
deadbranch clean -i
The interactive mode provides users with a full-screen view for browsing, filtering, and selecting branches for deletion, complete with Vim-style navigation and visual selection options. This approach enables granular control over what branches to delete while ensuring that essential branches remain untouched.
deadbranch incorporates robust safety mechanisms to prevent accidental deletions, such as confirmation prompts and backup functionality. Users can customize their configuration via a config.toml file, setting default parameters like branch age thresholds and protected branches.
In summary, deadbranch enhances repository management by ensuring it stays clutter-free and that important branches remain protected while providing tools to restore any accidentally deleted branches.
No comments yet.
Sign in to be the first to comment.