Documentation/git-cherry-pick.txt et al.: Fix misleading -n description
[git/dscho.git] / Documentation / git-revert.txt
blobf7f4bd4689a3b160d27bc28e54a8c9a0e12e81cc
1 git-revert(1)
2 =============
4 NAME
5 ----
6 git-revert - Revert an existing commit
8 SYNOPSIS
9 --------
10 'git-revert' [--edit | --no-edit] [-n] [-m parent-number] [-s] <commit>
12 DESCRIPTION
13 -----------
14 Given one existing commit, revert the change the patch introduces, and record a
15 new commit that records it.  This requires your working tree to be clean (no
16 modifications from the HEAD commit).
18 OPTIONS
19 -------
20 <commit>::
21         Commit to revert.
22         For a more complete list of ways to spell commit names, see
23         "SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
25 -e::
26 --edit::
27         With this option, `git-revert` will let you edit the commit
28         message prior to committing the revert. This is the default if
29         you run the command from a terminal.
31 -m parent-number::
32 --mainline parent-number::
33         Usually you cannot revert a merge because you do not know which
34         side of the merge should be considered the mainline.  This
35         option specifies the parent number (starting from 1) of
36         the mainline and allows revert to reverse the change
37         relative to the specified parent.
39 --no-edit::
40         With this option, `git-revert` will not start the commit
41         message editor.
43 -n::
44 --no-commit::
45         Usually the command automatically creates a commit with
46         a commit log message stating which commit was
47         reverted.  This flag applies the change necessary
48         to revert the named commit to your working tree
49         and the index, but does not make the commit.  In addition,
50         when this option is used, your index does not have to match
51         the HEAD commit.  The revert is done against the
52         beginning state of your index.
54 This is useful when reverting more than one commits'
55 effect to your index in a row.
57 -s::
58 --signoff::
59         Add Signed-off-by line at the end of the commit message.
62 Author
63 ------
64 Written by Junio C Hamano <junkio@cox.net>
66 Documentation
67 --------------
68 Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
70 GIT
71 ---
72 Part of the linkgit:git[1] suite