git-clean-gone

Community

Safely remove local branches and worktrees

Authord3ming
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Cleans up stale local Git branches whose remote tracking branches have been deleted and removes any associated worktrees to prevent repository clutter and confusion.

Core Features & Use Cases

  • Identifies local branches marked as gone by synchronizing remote state and inspecting branch status.
  • Locates and removes worktrees tied to gone branches before deleting the branches to avoid dangling references.
  • Protects the current branch and common main branches while reporting removed worktrees and deleted branches.
  • Use Case: After a merge that deleted feature branches on the remote, run this to safely purge the corresponding local branches and worktrees.

Quick Start

Clean up this repository by removing local branches whose remote tracking branches were deleted and delete any associated worktrees.

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-clean-gone
Download link: https://github.com/d3ming/dot-agents/archive/main.zip#git-clean-gone

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.