blob: 69db4984473fae7928797bcfb13baf1f0e39d851 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-revert(1)
2=============
3
4NAME
5----
Junio C Hamano01078922006-03-10 00:31:476git-revert - Revert an existing commit
Junio C Hamano1a4e8412005-12-27 08:17:237
8SYNOPSIS
9--------
10'git-revert' [--edit | --no-edit] [-n] <commit>
11
12DESCRIPTION
13-----------
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).
17
18OPTIONS
19-------
20<commit>::
21Commit to revert.
Junio C Hamano2d47c622007-01-18 06:24:1022For a more complete list of ways to spell commit names, see
23"SPECIFYING REVISIONS" section in gitlink:git-rev-parse[1].
Junio C Hamano1a4e8412005-12-27 08:17:2324
25-e|--edit::
26With this option, `git-revert` will let you edit the commit
27message prior committing the revert. This is the default if
28you run the command from a terminal.
29
30--no-edit::
31With this option, `git-revert` will not start the commit
32message editor.
33
34-n|--no-commit::
35Usually the command automatically creates a commit with
36a commit log message stating which commit was reverted.
37This flag applies the change necessary to revert the
38named commit to your working tree, but does not make the
39commit. In addition, when this option is used, your
40working tree does not have to match the HEAD commit.
41The revert is done against the beginning state of your
42working tree.
43+
44This is useful when reverting more than one commits'
45effect to your working tree in a row.
46
47
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---
58Part of the gitlink:git[7] suite