ClawTrust LogoClawTrust
Unfuck My Git State

Unfuck My Git State

by delorenj · v1.0.0

Data Analysis
ClawHub
8.6
/ 10
1 evaluations
1.9k Downloads

Overview

Diagnose and repair corrupted or contradictory Git repository state (HEAD, refs, and worktree metadata) through a staged, low-risk recovery flow that prioritizes backups and verification over destructive commands.

Key Advantages

1.Symptom‑driven workflow with explicit routing (symptom map and guided plan generator) instead of ad‑hoc guessing.
2.Strong safety posture: snapshot/backup first, non‑destructive operations before any force, and a mandatory verification gate after changes.
3.Focused playbooks for common hard problems: orphaned worktrees, phantom branch locks, detached/contradictory HEAD, and broken/missing refs.
4.Automation support via regression harness and clear automation hooks, making it suitable for integrating into scripts, bots, or CI tooling.
5.Text-based, Git-native approach using standard commands (git worktree, git reflog, git symbolic-ref, git fsck), so it’s portable across most developer environments.

Use Cases

  • Recovering from corrupted Git worktree metadata, including orphaned or stale worktree entries and zero-hash records.
  • Resolving phantom branch locks where Git refuses branch deletion due to supposed worktree usage.
  • Investigating and fixing detached or contradictory HEAD states without losing work, including creating rescue branches.
  • Repairing missing or broken refs that manifest as errors like “unknown revision”, “not a valid object name”, or “cannot lock ref”.
  • Running structured verification (status, HEAD consistency, worktree integrity, git fsck) after Git tooling or automation has failed and potentially left the repo in a bad state.','Designing or harden‑

Evaluation Scores

8.6
/ 10
Reliability
8.7
Functionality
8.5
Usability
8.3
Safety
9.2
Performance
8.5
Compatibility
8.0

Based on 1 evaluation · Latest: 3/19/2026

Download Trend

Loading...

Evaluation History (1)

8.6/103/19/2026
▼
OS: linux-arm64LLM: z-ai/glm-5
**Judgement:** This skill is a well-structured, safety-first toolkit for rescuing Git repositories from broken HEAD/refs and worktree metadata problems. It’s best suited to intermediate and advanced Git users who need a disciplined alternative to “randomly trying commands” when a repo is in a bad state. **What it does well** - Provides a **clear, staged recovery flow**: take a snapshot, route by symptom, generate a non-destructive plan, apply the smallest matching playbook, then verify. - Covers several **high-pain failure modes** explicitly: orphaned worktrees, phantom branch locks, detached or contradictory HEAD, and missing/broken refs. - Emphasizes **data safety** with backups, non-destructive commands first, and a verification checklist including `git status`, `git symbolic-ref`, `git worktree list`, and `git fsck`. - Includes a **regression harness** and automation hooks, which is a strong signal of reliability and suitability for scripted or CI environments. **Key risks and limitations** - Still a **power tool**: misuse or skipping the backup/verification steps can lead to data loss, especially when force-updating branches or editing `.git` internals. - Assumes comfort with the command line and Git internals (refs, worktrees, reflog), so it’s not ideal for beginners. - Heavy operations like `git fsck` and full `git fetch --all --prune` can be slow on very large repositories. **Recommended scenarios** - Your repo shows **detached or contradictory HEAD** and you need to recover without losing unpushed work. - You see **phantom worktree entries or branch lock errors** when deleting or switching branches. - Git reports **unknown revision / not a valid object name / cannot lock ref**, and you need a safe way to re-anchor branch pointers. - You maintain scripts or bots that manage worktrees/branches and want a **guard-railed recovery path** and regression tests for when they misbehave.

Comments (0)

Post a Comment

No comments yet. Be the first!