grgit-revert
Description
Given one or more existing commits, revert the changes that the related patches introduce, and record some new commits that record them. This requires your working tree to be clean (no modifications from the HEAD commit).
Note: git revert is used to record some new commits to reverse the effect of some earlier commits (often only a faulty one). If you want to throw away all uncommitted changes in your working directory, you should see grgit-reset, particularly the hard
option. Take care with these alternatives as they will discard uncommitted changes in your working directory.
Returns a Commit representing the new HEAD
.
Options
- commits
-
(
List<Object>
, default:[]]
) Commits to revert. For a more complete list of ways to spell commit names, see grgit-resolve (specifically thetoCommit
method).