Git Cleanup

•
3.0k
•

Safely analyzes and removes merged, squash-merged, and superseded local git branches and worktrees through a multi-step gated workflow.

Git Cleanup is a sophisticated developer utility designed to manage local repository clutter without the risk of data loss. It goes beyond basic git commands by intelligently detecting squash-merged branches that standard tools often miss, grouping related branch iterations by name prefix to identify superseded work, and performing thorough safety checks for uncommitted changes in worktrees. Operating on a 'Safety First' principle, the skill provides a comprehensive analysis of your local environment and requires explicit user confirmation at two separate gates before executing any destructive actions, making it an essential tool for maintaining clean, high-performance development environments.

Características Principales

01Intelligent squash-merge detection using PR history and commit logs
02Dirty state detection to prevent removal of worktrees with uncommitted changes
03Gated workflow requiring explicit user approval before any branch or worktree deletion
04Precise categorization of branches into safe-to-delete, active, or review-needed status
05Automatic grouping of related branch prefixes to identify superseded iterations
062,992 GitHub stars

Casos de Uso

01Reclaiming disk space by safely removing stale git worktrees that are no longer in use
02Pruning dozens of local branches after a major project milestone or release
03Syncing local branch state after remote tracking branches have been deleted or merged