git-github-reflog

Recover lost Git commits and branches using reflog history.

1|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/FutureAtoms/claude-skills-backup --skill git-github-reflog
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-github-reflog
Source: https://github.com/FutureAtoms/claude-skills-backup/tree/main/git-github-reflog
Command: npx skills add https://github.com/FutureAtoms/claude-skills-backup --skill git-github-reflog

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps users recover lost commits and branches in Git, acting as a safety net against accidental deletions or resets.

Core Features & Use Cases

  • Reflog Interpretation: Understand and navigate Git's reflog history.
  • Commit Recovery: Restore lost commits after hard resets or bad rebases.
  • Branch Recovery: Recreate branches that were accidentally deleted.
  • Use Case: You accidentally ran git reset --hard HEAD~5 and lost several commits. This skill can help you find those commits in the reflog and reset your branch to recover them.

Quick Start

Use the git-github-reflog skill to recover a lost commit by providing the commit hash or reflog entry.

Frequently Asked Questions about git-github-reflog

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

FAQPage Schema
How do I recover lost commits after running git reset --hard?

To recover lost commits after a hard reset, use the Git reflog to view the history of HEAD updates, locate the commit hash from before the reset, and reset your branch back to that specific reflog entry.

Can I restore an accidentally deleted branch in Git?

Yes, you can restore a deleted branch in Git by searching the reflog for the branch's last commit hash and using git branch to recreate it, pointing the new branch to that recovered commit.

What is Git reflog and how does it work for recovery?

Git reflog is a local record of updates to branch tips and HEAD references. It works for recovery by logging every commit update, allowing you to navigate and restore historical states that standard commit history no longer tracks.

How do I find a specific file version lost during a bad rebase?

To find a specific file version lost during a bad rebase, search the reflog for historical commit states, checkout the file from a previous reflog entry, and restore it to your working directory.

Does Git reflog work for recovering pushed commits on a remote repository?

Git reflog is a local recovery mechanism tracking your repository's HEAD and branch updates. It recovers lost local commits, but remote recovery depends on the remote server's own reflog and branch history retention policies.

What are the limitations of using git reflog to restore deleted branches?

The main limitation of git reflog is that it only retains local history for a default period, typically 90 days. If a deleted branch or lost commit is older than the reflog expiration, it is permanently removed and cannot be restored.