Revert Surgical

Surgical Revert

archive228 61d7fea 666 B Updated

File contents

Surgical Revert

Don't git reset --hard away three good commits to undo one bad one.

  • Single commitgit revert <sha> creates an inverse commit; history stays intact and shared-branch-safe.
  • One file from a commitgit checkout <good-sha> -- path/to/file.
  • Hunk-levelgit checkout -p to revert specific changes, keep the rest.
  • A mergegit 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.

archive228/loopkit/tree/main/skills/revert-surgical commit 61d7fea0cd

Frequently asked questions

npx skillmds@latest add archive228/revert-surgical