Quick Actions
git revert
Description
Create a new commit that undoes the changes from a previous commit.
Command
git revert
Examples
Revert last commit
git revert HEAD
Revert specific commit
git revert abc1234
Revert without commit
git revert -n HEAD
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
--no-edit |
string | No | Use default commit message |
--continue |
string | No | Continue after resolving conflicts |
--abort |
string | No | Abort revert process |
-n |
string | No | Don't commit automatically |
Command Info
Category:
Undoing
Type:
Git
Views:
7
Status:
Active
Tags
revert
undo
safe