Documentation
README
Claude Command: Clean Branches
This command safely identifies and cleans up merged or stale Git branches.
Runs in read-only preview (--dry-run) mode by default, requiring explicit instructions to perform deletions.
Usage
# [Safest] Preview branches to be cleaned without executing any deletions
/git-cleanBranches --dry-run
# Clean local branches merged to main and inactive for over 90 days (requires individual confirmation)
/git-cleanBranches --stale 90
# Clean local and remote branches merged to release/v2.1 (auto-confirm)
/git-cleanBranches --base release/v2.1 --remote --yes
# [Dangerous] Force delete an unmerged local branch
/git-cleanBranches --force outdated-feature
Options
This is the opening of the README. Read the full README on GitHub.