unfuck-my-git-state

Diagnoses Git state issues and recovers via staged, low-risk workflow with verification gates.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/delorenj/00_ceiling --skill unfuck-my-git-state-delorenj
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unfuck-my-git-state
Source: https://github.com/delorenj/00_ceiling/tree/main/unfuck-my-git-state
Command: npx skills add https://github.com/delorenj/00_ceiling --skill unfuck-my-git-state-delorenj

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps users recover from corrupted or inconsistent Git repository states and worktree metadata, preventing further data loss or corruption.

Core Features & Use Cases

  • Diagnose Git Issues: Identifies common problems like detached HEADs, phantom worktree locks, missing refs, and zero-hash entries.
  • Staged Recovery: Guides users through a low-risk, step-by-step recovery process, prioritizing non-destructive fixes.
  • Use Case: When Git commands fail with errors like "already checked out" or "unknown revision," this Skill provides a structured approach to diagnose and resolve the underlying issue without making the situation worse.

Quick Start

Use the unfuck-my-git-state skill to diagnose and repair a broken Git repository state.

Frequently Asked Questions about unfuck-my-git-state

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

FAQPage Schema
How do I fix a detached HEAD state in my git repository?

To fix a detached HEAD state in your git repository, use a staged recovery flow that diagnoses the issue, creates a safety snapshot, and applies guided non-destructive repairs to restore branch metadata safely.

What is the best way to clear phantom worktree locks and orphaned entries?

The best way to clear phantom worktree locks and orphaned entries is to run a structured git repair process that identifies broken worktree metadata and executes low-risk operations to remove the locks.

Why does my git branch operation fail with an unknown revision or missing ref?

Your git branch operation fails with an unknown revision or missing ref due to corrupted repository state. A diagnostic recovery flow can identify the missing refs and execute a step-by-step plan to rebuild them.

How do I safely recover from corrupted git state without losing data?

To safely recover from corrupted git state without losing data, use a remediation process that employs snapshotting before applying fixes and uses verification gates to ensure the repository is stable.

How do I resolve zero-hash entries when running git commands?

To resolve zero-hash entries when running git commands, execute a low-risk recovery flow that diagnoses the broken repository state and repairs the invalid hash references using guided verification gates.

Can I repair an 'already checked out' git worktree error without deleting my current branch?

Yes, you can repair an 'already checked out' git worktree error without deleting your current branch by using a diagnostic process that targets phantom worktree locks and orphaned entries for safe removal.