# Revert Surgical

> Surgical Revert

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

---

# Surgical Revert
Don't `git reset --hard` away three good commits to undo one bad one.
- **Single commit** — `git revert <sha>` creates an inverse commit; history stays intact and shared-branch-safe.
- **One file from a commit** — `git checkout <good-sha> -- path/to/file`.
- **Hunk-level** — `git checkout -p` to revert specific changes, keep the rest.
- **A merge** — `git revert -m 1 <merge-sha>` (pick the mainline parent).
On a shared branch, always revert (forward), never rewrite history. Reproduce the breakage first so you revert the RIGHT thing, then verify the revert actually fixes it.

