git-troubleshooting

Community

Fix Git errors, recover lost work, and debug issues.

Authorgeoffjay
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Accidental git reset --hard, merge conflicts, detached HEAD states, or even repository corruption can lead to lost work and significant frustration. This Skill provides a comprehensive guide to diagnose and recover from common Git mistakes, saving you time and stress.

Core Features & Use Cases

  • Recover Lost Commits: Utilize git reflog and git fsck to find and restore deleted branches or commits, ensuring no work is truly lost.
  • Fix Merge Conflicts: Get step-by-step guidance on resolving basic and complex merge conflicts, including how to use git mergetool effectively.
  • Undo Changes: Learn techniques for undoing local or public commits, discarding file changes, and recovering from botched rebases, safely.
  • Use Case: A developer accidentally performs a git reset --hard and loses several hours of work. This Skill guides them through using git reflog to identify the lost commits and restore their branch, saving their progress and reducing stress.

Quick Start

View local history of HEAD to find lost commits

git reflog

Recover a lost commit (e.g., abc123)

git cherry-pick abc123

Or create a new branch from it

git branch recovered-branch abc123

Dependency Matrix

Required Modules

None required

Components

assetsreferences

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: git-troubleshooting
Download link: https://github.com/geoffjay/claude-plugins/archive/main.zip#git-troubleshooting

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository