# Git Reset

> Reset HEAD to a specified state, unstage files, or undo commits.

- Skill: `andersonlimahw/git-reset` (Agent Skill)
- Install (CLI): `npx skillmds@latest add andersonlimahw/git-reset`
- Raw SKILL.md: https://api.skillmd.com/api/skills/andersonlimahw/git-reset/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-reset

---


# Git Reset Skill

Reset the current HEAD to a specified state with three modes of operation.

## Capabilities
- Soft reset (keep changes staged): `git reset --soft <commit>`
- Mixed reset (unstage changes): `git reset --mixed <commit>` (default)
- Hard reset (discard changes): `git reset --hard <commit>` ⚠️ destructive
- Unstage file: `git reset HEAD <file>`
- Reset to HEAD: `git reset HEAD~1` (undo last commit)
- Keep working tree: `git reset --keep <commit>`
- Reset to remote: `git reset --hard origin/<branch>`
- Merge reset: `git reset --merge <commit>`

## Usage
Triggered when user says "reset", "unstage", "undo commit", "discard changes".
Warn before `--hard` — changes are unrecoverable (use reflog as safety net).
Prefer `--soft` or `--mixed` on shared branches. For shared branches, `git revert` is safer.

