guerlol

Undo — Git skill for Claude Code

Git community

Undo the last git operation, after showing exactly what will be lost.

How to install Undo

Installs to ~/.claude/skills/guerlol-gitkit-undo/SKILL.md

Terminal
mkdir -p ~/.claude/skills/guerlol-gitkit-undo && curl -fsSL https://raw.githubusercontent.com/guerlol/gitkit/HEAD/commands/undo.md -o ~/.claude/skills/guerlol-gitkit-undo/SKILL.md

Restart Claude Code, or start a new session, for it to be picked up.

What Undo does


description: Undo the last git operation, after showing exactly what will be lost argument-hint: [what you want undone] allowed-tools: [Bash]

/undo

What the user wants undone (may be empty — infer from the reflog): $ARGUMENTS

Undo is the command most likely to destroy work. The order is always: read the state, state the consequence in plain words, get a yes, then act.

1. Read the state

git reflog -10 --date=relative
git status --short
git log --oneline -5

Work out what

Alternatives in Git

Full documentation available on GitHub

View Source Repository