Skip to content
Back to skills

Git Worktree Cleanup And Branch Reconciliation

ASecurity

Systematic process for cleaning up stale git worktrees, resolving merge conflicts in diverged branches, and reconciling branch state across multiple repositories.

  • 17 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
businessgogit

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add vamseeachanta/workspace-hub --skill git-worktree-cleanup-and-branch-reconciliation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Git Worktree Cleanup And Branch Reconciliation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Git Worktree Cleanup And Branch Reconciliation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vamseeachanta-git-worktree-cleanup-and-branch-reconciliation/badge)](https://www.skillsdirectory.com/skills/vamseeachanta-git-worktree-cleanup-and-branch-reconciliation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: git-worktree-cleanup-and-branch-reconciliation
description: Systematic process for cleaning up stale git worktrees, resolving merge conflicts in diverged branches, and reconciling branch state across multiple repositories.
version: 1.0.0
source: auto-extracted
extracted: 2026-04-14
metadata:
  tags: ["git", "workflow", "branch-management", "multi-repo"]
---

# Git Worktree Cleanup and Branch Reconciliation

When managing multiple repos with stale branches and orphaned worktrees: (1) Identify worktrees attached to merged/stale branches using `git worktree list`, (2) Remove stale worktrees with `git worktree remove` to unblock branch deletion, (3) Categorize remaining branches (merged, feature-complete, orphaned from history rewrites), (4) For branches with unmerged content, pull latest main first to detect upstream merges, then resolve conflicts by keeping HEAD (main) on surrounding files while preserving the branch's actual fix logic, (5) Delete superseded branches and verify all repos are clean. Key insight: Worktrees block deletion and consume disk; history rewrites create "no common ancestor" branches that can't merge.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…