Imported Upstream version 2.25.1
[platform/upstream/git.git] / Documentation / git-revert.txt
index 70152e8..9d22270 100644 (file)
@@ -8,10 +8,8 @@ git-revert - Revert some existing commits
 SYNOPSIS
 --------
 [verse]
-'git revert' [--edit | --no-edit] [-n] [-m parent-number] [-s] <commit>...
-'git revert' --continue
-'git revert' --quit
-'git revert' --abort
+'git revert' [--[no-]edit] [-n] [-m parent-number] [-s] [-S[<keyid>]] <commit>...
+'git revert' (--continue | --skip | --abort | --quit)
 
 DESCRIPTION
 -----------
@@ -24,12 +22,15 @@ 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 linkgit:git-reset[1], particularly the '--hard' option.  If
+should see linkgit:git-reset[1], particularly the `--hard` option.  If
 you want to extract specific files as they were in another commit, you
-should see linkgit:git-checkout[1], specifically the `git checkout
-<commit> -- <filename>` syntax.  Take care with these alternatives as
+should see linkgit:git-restore[1], specifically the `--source`
+option. Take care with these alternatives as
 both will discard uncommitted changes in your working directory.
 
+See "Reset, restore and revert" in linkgit:git[1] for the differences
+between the three commands.
+
 OPTIONS
 -------
 <commit>...::
@@ -37,7 +38,7 @@ OPTIONS
        For a more complete list of ways to spell commit names, see
        linkgit:gitrevisions[7].
        Sets of commits can also be given but no traversal is done by
-       default, see linkgit:git-rev-list[1] and its '--no-walk'
+       default, see linkgit:git-rev-list[1] and its `--no-walk`
        option.
 
 -e::
@@ -59,13 +60,20 @@ brought in by the merge.  As a result, later merges will only bring in tree
 changes introduced by commits that are not ancestors of the previously
 reverted merge.  This may or may not be what you want.
 +
-See the link:howto/revert-a-faulty-merge.txt[revert-a-faulty-merge How-To] for
+See the link:howto/revert-a-faulty-merge.html[revert-a-faulty-merge How-To] for
 more details.
 
 --no-edit::
        With this option, 'git revert' will not start the commit
        message editor.
 
+--cleanup=<mode>::
+       This option determines how the commit message will be cleaned up before
+       being passed on to the commit machinery. See linkgit:git-commit[1] for more
+       details. In particular, if the '<mode>' is given a value of `scissors`,
+       scissors will be appended to `MERGE_MSG` before being passed on in the case
+       of a conflict.
+
 -n::
 --no-commit::
        Usually the command automatically creates some commits with
@@ -80,9 +88,16 @@ more details.
 This is useful when reverting more than one commits'
 effect to your index in a row.
 
+-S[<keyid>]::
+--gpg-sign[=<keyid>]::
+       GPG-sign commits. The `keyid` argument is optional and
+       defaults to the committer identity; if specified, it must be
+       stuck to the option without a space.
+
 -s::
 --signoff::
        Add Signed-off-by line at the end of the commit message.
+       See the signoff option in linkgit:git-commit[1] for more information.
 
 --strategy=<strategy>::
        Use the given merge strategy.  Should only be used once.
@@ -94,6 +109,11 @@ effect to your index in a row.
        Pass the merge strategy-specific option through to the
        merge strategy.  See linkgit:git-merge[1] for details.
 
+--rerere-autoupdate::
+--no-rerere-autoupdate::
+       Allow the rerere mechanism to update the index with the
+       result of auto-conflict resolution if possible.
+
 SEQUENCER SUBCOMMANDS
 ---------------------
 include::sequencer.txt[]