Compare

Git Cherry-pick vs Revert

How to choose between replaying a commit elsewhere and undoing one where it already exists.

These commands solve different problems. Cherry-pick copies a commit onto another branch. Revert creates a new commit that undoes an earlier change.

Use Cherry-pick When

You need one specific commit on another branch without merging the full branch.

You are backporting a targeted fix to a release branch.

Use Revert When

The bad change is already part of the current branch history.

You need a safe, history-preserving way to undo shared work.

Rule of Thumb

Cherry-pick moves a change. Revert cancels a change.

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