make some more strings translatable
[TortoiseGit.git] / doc / source / en / TortoiseGit / git_doc / git-revert.html.xml
blobe2bdf303872374c4a05732af8f318695cfac98d5
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">\r
3 \r
4 <article lang="en" id="git-revert(1)">\r
5 <articleinfo>\r
6     <title>git-revert(1)</title>\r
7         <indexterm>\r
8                 <primary>git-revert(1)</primary>\r
9         </indexterm>\r
10 </articleinfo>\r
11 <simplesect id="_name">\r
12 <title>NAME</title>\r
13 <simpara>git-revert - Revert an existing commit</simpara>\r
14 </simplesect>\r
15 <simplesect id="_synopsis">\r
16 <title>SYNOPSIS</title>\r
17 <simpara><emphasis>git revert</emphasis> [--edit | --no-edit] [-n] [-m parent-number] [-s] &lt;commit&gt;</simpara>\r
18 </simplesect>\r
19 <simplesect id="_description">\r
20 <title>DESCRIPTION</title>\r
21 <simpara>Given one existing commit, revert the change the patch introduces, and record a\r
22 new commit that records it.  This requires your working tree to be clean (no\r
23 modifications from the HEAD commit).</simpara>\r
24 <simpara>Note: <emphasis>git revert</emphasis> is used to record a new commit to reverse the\r
25 effect of an earlier commit (often a faulty one).  If you want to\r
26 throw away all uncommitted changes in your working directory, you\r
27 should see <xref linkend="git-reset(1)"/>, particularly the <emphasis>--hard</emphasis> option.  If\r
28 you want to extract specific files as they were in another commit, you\r
29 should see <xref linkend="git-checkout(1)"/>, specifically the <emphasis>git checkout\r
30 &lt;commit&gt;&#8201;&#8212;&#8201;&lt;filename&gt;</emphasis> syntax.  Take care with these alternatives as\r
31 both will discard uncommitted changes in your working directory.</simpara>\r
32 </simplesect>\r
33 <simplesect id="_options">\r
34 <title>OPTIONS</title>\r
35 <variablelist>\r
36 <varlistentry>\r
37 <term>\r
38 &lt;commit&gt;\r
39 </term>\r
40 <listitem>\r
41 <simpara>\r
42         Commit to revert.\r
43         For a more complete list of ways to spell commit names, see\r
44         "SPECIFYING REVISIONS" section in <xref linkend="git-rev-parse(1)"/>.\r
45 </simpara>\r
46 </listitem>\r
47 </varlistentry>\r
48 <varlistentry>\r
49 <term>\r
50 -e\r
51 </term>\r
52 <term>\r
53 --edit\r
54 </term>\r
55 <listitem>\r
56 <simpara>\r
57         With this option, <emphasis>git-revert</emphasis> will let you edit the commit\r
58         message prior to committing the revert. This is the default if\r
59         you run the command from a terminal.\r
60 </simpara>\r
61 </listitem>\r
62 </varlistentry>\r
63 <varlistentry>\r
64 <term>\r
65 -m parent-number\r
66 </term>\r
67 <term>\r
68 --mainline parent-number\r
69 </term>\r
70 <listitem>\r
71 <simpara>\r
72         Usually you cannot revert a merge because you do not know which\r
73         side of the merge should be considered the mainline.  This\r
74         option specifies the parent number (starting from 1) of\r
75         the mainline and allows revert to reverse the change\r
76         relative to the specified parent.\r
77 </simpara>\r
78 <simpara>Reverting a merge commit declares that you will never want the tree changes\r
79 brought in by the merge.  As a result, later merges will only bring in tree\r
80 changes introduced by commits that are not ancestors of the previously\r
81 reverted merge.  This may or may not be what you want.</simpara>\r
82 <simpara>See the <ulink url="howto/revert-a-faulty-merge.txt">revert-a-faulty-merge How-To</ulink> for\r
83 more details.</simpara>\r
84 </listitem>\r
85 </varlistentry>\r
86 <varlistentry>\r
87 <term>\r
88 --no-edit\r
89 </term>\r
90 <listitem>\r
91 <simpara>\r
92         With this option, <emphasis>git-revert</emphasis> will not start the commit\r
93         message editor.\r
94 </simpara>\r
95 </listitem>\r
96 </varlistentry>\r
97 <varlistentry>\r
98 <term>\r
99 -n\r
100 </term>\r
101 <term>\r
102 --no-commit\r
103 </term>\r
104 <listitem>\r
105 <simpara>\r
106         Usually the command automatically creates a commit with\r
107         a commit log message stating which commit was\r
108         reverted.  This flag applies the change necessary\r
109         to revert the named commit to your working tree\r
110         and the index, but does not make the commit.  In addition,\r
111         when this option is used, your index does not have to match\r
112         the HEAD commit.  The revert is done against the\r
113         beginning state of your index.\r
114 </simpara>\r
115 <simpara>This is useful when reverting more than one commits'\r
116 effect to your index in a row.</simpara>\r
117 </listitem>\r
118 </varlistentry>\r
119 <varlistentry>\r
120 <term>\r
121 -s\r
122 </term>\r
123 <term>\r
124 --signoff\r
125 </term>\r
126 <listitem>\r
127 <simpara>\r
128         Add Signed-off-by line at the end of the commit message.\r
129 </simpara>\r
130 </listitem>\r
131 </varlistentry>\r
132 </variablelist>\r
133 </simplesect>\r
134 <simplesect id="_author">\r
135 <title>Author</title>\r
136 <simpara>Written by Junio C Hamano &lt;<ulink url="mailto:gitster@pobox.com">gitster@pobox.com</ulink>&gt;</simpara>\r
137 </simplesect>\r
138 <simplesect id="_documentation">\r
139 <title>Documentation</title>\r
140 <simpara>Documentation by Junio C Hamano and the git-list &lt;<ulink url="mailto:git@vger.kernel.org">git@vger.kernel.org</ulink>&gt;.</simpara>\r
141 </simplesect>\r
142 <simplesect id="_git">\r
143 <title>GIT</title>\r
144 <simpara>Part of the <xref linkend="git(1)"/> suite</simpara>\r
145 </simplesect>\r
146 </article>\r