Compare

Git Reset vs Revert

The practical difference between rewriting local history and undoing shared history safely.

Reset moves branch pointers and can discard local state. Revert records a new commit that undoes an old one. That makes reset a local cleanup tool and revert a collaboration-safe undo tool.

Use Reset When

You are cleaning up local work that has not been shared yet.

You want to move HEAD and maybe unstage or discard changes on your machine.

Use Revert When

The original commit has already been pushed or shared.

You need an auditable undo that teammates can pull normally.

Rule of Thumb

Reset rewrites. Revert records.

Want the short version? Browse the compact sheet views and save the commands you use most into a Cheatbook.