git/revert

Revert Commit

Create new commit that undoes changes

git
revert
commit

Command

git revert

Explanation

git revert is used to create a new commit that undoes changes. It creates a new commit that undoes the changes.

Examples

Revert specific commit

git revert abc123

Revert last commit

git revert HEAD