FahamLah

Commands

git revert

git revert <commit>

Risk: Safe

What it does

Makes a new commit that undoes an old one.

When to use it

To undo a commit others already have.

Example

$ git revert HEAD

Undo the last commit, safely.