blob: e27c6808b3fd1fb82aefabcd7a925ccce78a8f2b [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-revert(1)
2=============
3
4NAME
5----
6git-revert - Revert an existing commit.
7
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.
22
23-e|--edit::
24With this option, `git-revert` will let you edit the commit
25message prior committing the revert. This is the default if
26you run the command from a terminal.
27
28--no-edit::
29With this option, `git-revert` will not start the commit
30message editor.
31
32-n|--no-commit::
33Usually the command automatically creates a commit with
34a commit log message stating which commit was reverted.
35This flag applies the change necessary to revert the
36named commit to your working tree, but does not make the
37commit. In addition, when this option is used, your
38working tree does not have to match the HEAD commit.
39The revert is done against the beginning state of your
40working tree.
41+
42This is useful when reverting more than one commits'
43effect to your working tree in a row.
44
45
46Author
47------
48Written by Junio C Hamano <junkio@cox.net>
49
50Documentation
51--------------
52Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
53
54GIT
55---
56Part of the gitlink:git[7] suite
57