# Git Reflog

> Recover lost commits and manage the reference log.

- Skill: `andersonlimahw/git-reflog` (Agent Skill)
- Install (CLI): `npx skillmds@latest add andersonlimahw/git-reflog`
- Raw SKILL.md: https://api.skillmd.com/api/skills/andersonlimahw/git-reflog/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Andersonlimahw (https://skillmd.com/u/andersonlimahw)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/andersonlimahw/git-reflog

---


# Git Reflog Skill

Track and recover commits that are no longer reachable from any branch or tag.

## Capabilities
- View reflog: `git reflog` or `git log -g`
- Show reflog for specific ref: `git reflog show <ref>`
- View reflog with dates: `git reflog --date=iso`
- Recover lost commit: `git checkout <reflog-hash>` then create branch
- Reset to reflog entry: `git reset --hard HEAD@{n}`
- View specific entry: `git show HEAD@{n}`
- Expire reflog: `git reflog expire --expire=30.days --all`
- Delete reflog entries: `git reflog delete HEAD@{n}`
- Stash reflog: `git reflog show refs/stash`

## Usage
Triggered when user says "reflog", "lost commit", "recover deleted branch", "undo reset".
First check reflog, then use `git checkout -b <new-branch> <hash>` to restore lost work.

