git-deadlock-plumbing-recovery

Recover hung Git operations on macOS using plumbing commands and lock cleanup.

Updated Nov 18, 2025
One-click install
npx skills add https://github.com/cajias/claude-skills --skill git-deadlock-plumbing-recovery
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-deadlock-plumbing-recovery
Source: https://github.com/cajias/claude-skills/tree/main/plugins/git-workflow/skills/git-deadlock-plumbing-recovery
Command: npx skills add https://github.com/cajias/claude-skills --skill git-deadlock-plumbing-recovery

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps recover Git commands that hang indefinitely on macOS, especially when write operations stall at low CPU, lock files get stuck, or the index is missing after an interrupted operation.

Core Features & Use Cases

  • Deadlock Diagnosis: Identifies whether Git is truly blocked on I/O or just slow, using process state, object counts, and disk pressure signals.
  • Safe Recovery Workflow: Clears stale locks, rebuilds a missing index from HEAD, and restores commits using Git plumbing commands that avoid working-tree rescans.
  • Practical Use Case: Use it when git commit, git push, git gc, or even git status never finishes and you need to recover the repository without making the stall worse.

Quick Start

Ask for a step-by-step recovery plan to diagnose the hang, clear stale Git locks, rebuild the index if needed, and create the next commit using plumbing commands instead of a normal Git write operation.

Frequently Asked Questions about git-deadlock-plumbing-recovery

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

FAQPage Schema
Why does git status hang indefinitely on macOS and how do I unstick it?

Git operations deadlock when stale lock files, missing indexes, or near-full APFS volumes stall write operations in interruptible sleep. This Skill diagnoses whether Git is truly blocked on I/O before applying safe recovery steps.

How do I recover a stuck git commit without losing uncommitted changes?

Recover a stuck git commit by clearing stale locks, rebuilding the missing index from HEAD, and restoring the commit using git plumbing commands that bypass working-tree rescans to prevent data loss.

How do I fix a hung git push or git gc on a nearly full APFS volume?

Fix a hung git push or git gc on a near-full APFS volume by diagnosing disk pressure signals and executing timeout-bound recovery steps that clear locks and reduce loose-object buildup without scanning the working tree.

What is the best way to rebuild a missing git index from HEAD?

The best way to rebuild a missing git index is to use git plumbing commands to reconstruct it directly from HEAD, avoiding standard write operations that trigger working-tree rescans and risk further deadlocks.

Can I clear stale git lock files without corrupting the repository?

Yes, you can clear stale git lock files safely by first diagnosing if the process is truly blocked in interruptible sleep, then removing only the stale locks and verifying repository integrity without scanning the working tree.

When should I use git plumbing commands instead of standard git operations for deadlock recovery?

Use git plumbing commands for deadlock recovery when standard operations like commit or push stall indefinitely, allowing you to create commits and rebuild indexes without triggering working-tree rescans that worsen the hang.