commit-commands/clean_gone

Cleans up all git branches marked as [gone] (branches that have been deleted on the remote but still exist locally), including removing associated worktrees.

Content Preview
---
description: Cleans up all git branches marked as [gone] (branches that have been deleted on the remote but still exist locally), including removing associated worktrees.
---

## Your Task

You need to execute the following bash commands to clean up stale local branches that have been deleted from the remote repository.

## Commands to Execute

1. **First, list branches to identify any with [gone] status**
   Execute this command:
   ```bash
   git branch -v
   ```
   
   Note: Branches with
How to Use

Recommended: Install to project (local)

mkdir -p .claude/skills
curl -o .claude/skills/commit-commands/clean_gone.md \
  https://raw.githubusercontent.com/anthropics/claude-plugins-official/main/plugins/commit-commands/commands/clean_gone.md

Skill is scoped to this project only. Add .claude/skills/ to your .gitignoreif you don't want to commit it.

Alternative: Clone full repo

git clone https://github.com/anthropics/claude-plugins-official

Then reference at plugins/commit-commands/commands/clean_gone.md

Related Skills