Merge branch 'ja/shorthelp'
[git/git.git] / Documentation / git-revert.txt
CommitLineData
215a7ad1
JH
1git-revert(1)
2=============
7fc9d69f
JH
3
4NAME
5----
7bd7f280 6git-revert - Revert an existing commit
7fc9d69f
JH
7
8SYNOPSIS
9--------
8bf14d6e 10'git-revert' [--edit | --no-edit] [-n] <commit>
7fc9d69f
JH
11
12DESCRIPTION
13-----------
52a22d1e
LAS
14Given one existing commit, revert the change the patch introduces, and record a
15new commit that records it. This requires your working tree to be clean (no
16modifications from the HEAD commit).
7fc9d69f
JH
17
18OPTIONS
19-------
52a22d1e
LAS
20<commit>::
21 Commit to revert.
41a5564e
SP
22 For a more complete list of ways to spell commit names, see
23 "SPECIFYING REVISIONS" section in gitlink:git-rev-parse[1].
7fc9d69f 24
674b2808 25-e|--edit::
8bf14d6e
PB
26 With this option, `git-revert` will let you edit the commit
27 message prior committing the revert. This is the default if
28 you run the command from a terminal.
29
30--no-edit::
31 With this option, `git-revert` will not start the commit
32 message editor.
33
674b2808 34-n|--no-commit::
de2b82c6
JH
35 Usually the command automatically creates a commit with
36 a commit log message stating which commit was reverted.
37 This flag applies the change necessary to revert the
38 named commit to your working tree, but does not make the
39 commit. In addition, when this option is used, your
40 working tree does not have to match the HEAD commit.
41 The revert is done against the beginning state of your
42 working tree.
df8baa42
JF
43+
44This is useful when reverting more than one commits'
45effect to your working tree in a row.
de2b82c6
JH
46
47
7fc9d69f
JH
48Author
49------
50Written by Junio C Hamano <junkio@cox.net>
51
52Documentation
53--------------
54Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
55
56GIT
57---
a7154e91 58Part of the gitlink:git[7] suite