git-worktree-cleanup-and-branch-reconciliation

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

5 stars

Best use case

git-worktree-cleanup-and-branch-reconciliation is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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

Teams using git-worktree-cleanup-and-branch-reconciliation should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/git-worktree-cleanup-and-branch-reconciliation/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/workspace-hub/learned/git-worktree-cleanup-and-branch-reconciliation/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/git-worktree-cleanup-and-branch-reconciliation/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How git-worktree-cleanup-and-branch-reconciliation Compares

Feature / Agentgit-worktree-cleanup-and-branch-reconciliationStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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.

Related Skills

mnt-analysis-cleanup

5
from vamseeachanta/workspace-hub

Survey, classify, and clean up `/mnt/local-analysis/` (or any sibling-to-workspace-hub directory holding orphan worktrees, codex-burn artifacts, agent log accumulations, and outer-clone duplicates) without losing useful code/work. Surfaces a tiered approval menu rather than baking decisions; defers all destructive ops until user confirms.

digitalmodel-worktree-test-execution-with-shared-venv

5
from vamseeachanta/workspace-hub

Run digitalmodel tests from isolated worktrees without uv editable-dependency failures by using the main repo's existing virtualenv and PYTHONPATH.

blender-worktree-test-hardening

5
from vamseeachanta/workspace-hub

Recover and harden digitalmodel Blender automation work in isolated worktrees when uv/editable dependency paths break and local machines lack a Blender executable.

pre-completion-cleanup-audit

5
from vamseeachanta/workspace-hub

Audit and dispose of session residue (orphan files, scratch dirs, sibling-repo state, locks, trash-stages) BEFORE claiming a task complete. Required gate before any agent says "all done", "task complete", or hands work back to user/orchestrator.

worktree-pre-push-bypass-for-tier1-checks

5
from vamseeachanta/workspace-hub

Handle workspace-hub integration-branch pushes from isolated git worktrees when the pre-push hook incorrectly assumes sibling tier-1 repos exist under the worktree path.

worktree-branch-sync-hygiene

5
from vamseeachanta/workspace-hub

Class-level branch, worktree, dirty-main, stash, sync, and hook hygiene for workspace-hub style multi-repo work.

multi-source-tax-document-reconciliation

5
from vamseeachanta/workspace-hub

Verify generated tax forms against source documents by line-by-line comparison, not just totals

multi-repo-branch-hygiene-at-scale

5
from vamseeachanta/workspace-hub

Systematic approach to cleaning stale branches, resolving merge conflicts, and syncing multiple repos

multi-file-tax-reconciliation-workflow

5
from vamseeachanta/workspace-hub

Systematic parallel review and reconciliation of multi-document tax filings with cross-reference validation

git-worktree-cleanup-at-scale

5
from vamseeachanta/workspace-hub

Identify and remove stale git worktrees blocking branch deletion in multi-repo environments

git-worktree-cleanup-and-branch-hygiene

5
from vamseeachanta/workspace-hub

Systematic approach to cleaning up stale git worktrees, orphan branches, and branch hygiene at scale across multiple repos

git-blob-size-filter-cleanup

5
from vamseeachanta/workspace-hub

Strip oversized blobs from unpushed commits using git filter-branch when GitHub's 100 MB limit blocks push