Cleanup xread() loops to use read_in_full()
[git/dscho.git] / Documentation / git-revert.txt
blob93e20f7752f0d48faca153eef144845b2db9ce1d
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] <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|--edit::
26         With this option, `git-revert` will let you edit the commit
27         message prior to committing the revert. This is the default if
28         you run the command from a terminal.
30 -m parent-number|--mainline parent-number::
31         Usually you cannot revert a merge because you do not know which
32         side of the merge should be considered the mainline.  This
33         option specifies the parent number (starting from 1) of
34         the mainline and allows revert to reverse the change
35         relative to the specified parent.
37 --no-edit::
38         With this option, `git-revert` will not start the commit
39         message editor.
41 -n|--no-commit::
42         Usually the command automatically creates a commit with
43         a commit log message stating which commit was reverted.
44         This flag applies the change necessary to revert the
45         named commit to your working tree, but does not make the
46         commit.  In addition, when this option is used, your
47         working tree does not have to match the HEAD commit.
48         The revert is done against the beginning state of your
49         working tree.
51 This is useful when reverting more than one commits'
52 effect to your working tree in a row.
55 Author
56 ------
57 Written by Junio C Hamano <junkio@cox.net>
59 Documentation
60 --------------
61 Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
63 GIT
64 ---
65 Part of the linkgit:git[7] suite