git-cleanup

Community

Analyze and clean up local git branches safely.

Authorshellicar
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Git cleanup helps you keep local repositories tidy by identifying and removing obsolete branches after merges or remote deletions.

Core Features & Use Cases

  • Local branch assessment and automated deletion suggestions to maintain a clean history.
  • Detect remote status ([gone]), merged, or abandoned branches and guide safe deletions.
  • Dry-run previews and safety checks to prevent accidental data loss.

Quick Start

  1. Backup your repository: git bundle create ~/backup-branches-$(date +%Y%m%d).bundle --all
  2. List branches and identify candidates: git branch -v
  3. Preview deletions (dry-run): git branch --merged main | grep -v '^*' | xargs -I{} bash -c 'echo Would delete {}'
  4. Delete a branch safely after validation: git branch -d <branch-name> or force with -D if needed

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: git-cleanup
Download link: https://github.com/shellicar/claude-config/archive/main.zip#git-cleanup

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.