git-clean-gone-branches

Identify and delete local git branches with deleted remote-tracking branches.

50|14|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/All-The-Vibes/ATV-StarterKit --skill git-clean-gone-branches-all-the-vibes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-clean-gone-branches
Source: https://github.com/All-The-Vibes/ATV-StarterKit/tree/main/.github/skills/git-clean-gone-branches
Command: npx skills add https://github.com/All-The-Vibes/ATV-StarterKit --skill git-clean-gone-branches-all-the-vibes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Clean up local branches whose remote-tracking branches have been deleted, reducing clutter and preventing confusion.

Core Features & Use Cases

  • Discover and identify local branches whose remote tracking branch has been deleted.
  • Prompt for user confirmation before deleting any branches and associated worktrees.
  • Safely delete gone branches and their worktrees after confirmation, with live reporting.

Quick Start

Detect gone branches, review the list, and confirm deletion to prune your local repository.

Frequently Asked Questions about git-clean-gone-branches

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I delete local git branches after their remote has been deleted?

To delete local git branches after their remote is deleted, you identify them using git branch -vv to find gone-tracking entries, then prune them after confirming the list. This ensures your local repository stays clean and synchronized with the current remote state.

What is the best way to prune local branches with gone remotes in a multi-branch environment?

The best way to prune local branches with gone remotes is to read git branch -vv for gone-tracking entries and safely delete them after explicit user confirmation. This handles standard Git workflows in both single-repo and multi-branch environments, including those with associated worktrees.

Does pruning gone local branches work if the branches have associated worktrees?

Yes, pruning gone local branches works if the branches have associated worktrees. The process discovers local branches whose remote tracking branch has been deleted and safely deletes both the branches and their worktrees after you explicitly confirm the action.

Why are gone remote-tracking branches still showing in my local repository?

Gone remote-tracking branches still show in your local repository because standard Git workflows leave local branches intact even after their remote counterparts are deleted. You can identify these gone branches using git branch -vv and remove them manually after explicit confirmation to reduce clutter.

Do I need to manually confirm before the script deletes gone branches and worktrees?

Yes, you need to manually confirm before the script deletes gone branches and worktrees. The process prompts for explicit user confirmation before safely deleting any branches and their associated worktrees, providing live reporting during the removal to prevent accidental data loss.