updated git doc
[TortoiseGit.git] / doc / source / en / TortoiseGit / git_doc / git-difftool.xml
blob5d602dbe69b94e95170adc93bdd9731ace887708
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">\r
3 \r
4 <article lang="en" id="git-difftool(1)">\r
5 <articleinfo>\r
6     <title>git-difftool(1)</title>\r
7 <indexterm>\r
8 <primary>git-difftool(1)</primary>\r
9 </indexterm>\r
10 </articleinfo>\r
11 <simplesect id="_name">\r
12 <title>NAME</title>\r
13 <simpara>git-difftool - Show changes using common diff tools</simpara>\r
14 </simplesect>\r
15 <simplesect id="_synopsis">\r
16 <title>SYNOPSIS</title>\r
17 <blockquote>\r
18 <literallayout><emphasis>git difftool</emphasis> [&lt;options&gt;] [&lt;commit&gt; [&lt;commit&gt;]] [--] [&lt;path&gt;&#8230;]</literallayout>\r
19 </blockquote>\r
20 </simplesect>\r
21 <simplesect id="_description">\r
22 <title>DESCRIPTION</title>\r
23 <simpara><emphasis>git difftool</emphasis> is a git command that allows you to compare and edit files\r
24 between revisions using common diff tools.  <emphasis>git difftool</emphasis> is a frontend\r
25 to <emphasis>git diff</emphasis> and accepts the same options and arguments. See\r
26 <xref linkend="git-diff(1)" />.</simpara>\r
27 </simplesect>\r
28 <simplesect id="_options">\r
29 <title>OPTIONS</title>\r
30 <variablelist>\r
31 <varlistentry>\r
32 <term>\r
33 -y\r
34 </term>\r
35 <term>\r
36 --no-prompt\r
37 </term>\r
38 <listitem>\r
39 <simpara>\r
40         Do not prompt before launching a diff tool.\r
41 </simpara>\r
42 </listitem>\r
43 </varlistentry>\r
44 <varlistentry>\r
45 <term>\r
46 --prompt\r
47 </term>\r
48 <listitem>\r
49 <simpara>\r
50         Prompt before each invocation of the diff tool.\r
51         This is the default behaviour; the option is provided to\r
52         override any configuration settings.\r
53 </simpara>\r
54 </listitem>\r
55 </varlistentry>\r
56 <varlistentry>\r
57 <term>\r
58 -t &lt;tool&gt;\r
59 </term>\r
60 <term>\r
61 --tool=&lt;tool&gt;\r
62 </term>\r
63 <listitem>\r
64 <simpara>\r
65         Use the diff tool specified by &lt;tool&gt;.\r
66         Valid diff tools are:\r
67         araxis, bc3, deltawalker, diffuse, emerge, ecmerge, gvimdiff,\r
68         kdiff3, kompare, meld, opendiff, p4merge, tkdiff, vimdiff and\r
69         xxdiff.\r
70 </simpara>\r
71 <simpara>If a diff tool is not specified, <emphasis>git difftool</emphasis>\r
72 will use the configuration variable <emphasis>diff.tool</emphasis>.  If the\r
73 configuration variable <emphasis>diff.tool</emphasis> is not set, <emphasis>git difftool</emphasis>\r
74 will pick a suitable default.</simpara>\r
75 <simpara>You can explicitly provide a full path to the tool by setting the\r
76 configuration variable <emphasis>difftool.&lt;tool&gt;.path</emphasis>. For example, you\r
77 can configure the absolute path to kdiff3 by setting\r
78 <emphasis>difftool.kdiff3.path</emphasis>. Otherwise, <emphasis>git difftool</emphasis> assumes the\r
79 tool is available in PATH.</simpara>\r
80 <simpara>Instead of running one of the known diff tools,\r
81 <emphasis>git difftool</emphasis> can be customized to run an alternative program\r
82 by specifying the command line to invoke in a configuration\r
83 variable <emphasis>difftool.&lt;tool&gt;.cmd</emphasis>.</simpara>\r
84 <simpara>When <emphasis>git difftool</emphasis> is invoked with this tool (either through the\r
85 <emphasis>-t</emphasis> or <emphasis>--tool</emphasis> option or the <emphasis>diff.tool</emphasis> configuration variable)\r
86 the configured command line will be invoked with the following\r
87 variables available: <emphasis>$LOCAL</emphasis> is set to the name of the temporary\r
88 file containing the contents of the diff pre-image and <emphasis>$REMOTE</emphasis>\r
89 is set to the name of the temporary file containing the contents\r
90 of the diff post-image.  <emphasis>$MERGED</emphasis> is the name of the file which is\r
91 being compared. <emphasis>$BASE</emphasis> is provided for compatibility\r
92 with custom merge tool commands and has the same value as <emphasis>$MERGED</emphasis>.</simpara>\r
93 </listitem>\r
94 </varlistentry>\r
95 <varlistentry>\r
96 <term>\r
97 -x &lt;command&gt;\r
98 </term>\r
99 <term>\r
100 --extcmd=&lt;command&gt;\r
101 </term>\r
102 <listitem>\r
103 <simpara>\r
104         Specify a custom command for viewing diffs.\r
105         <emphasis>git-difftool</emphasis> ignores the configured defaults and runs\r
106         <emphasis>$command $LOCAL $REMOTE</emphasis> when this option is specified.\r
107         Additionally, <emphasis>$BASE</emphasis> is set in the environment.\r
108 </simpara>\r
109 </listitem>\r
110 </varlistentry>\r
111 <varlistentry>\r
112 <term>\r
113 -g\r
114 </term>\r
115 <term>\r
116 --gui\r
117 </term>\r
118 <listitem>\r
119 <simpara>\r
120         When <emphasis>git-difftool</emphasis> is invoked with the <emphasis>-g</emphasis> or <emphasis>--gui</emphasis> option\r
121         the default diff tool will be read from the configured\r
122         <emphasis>diff.guitool</emphasis> variable instead of <emphasis>diff.tool</emphasis>.\r
123 </simpara>\r
124 </listitem>\r
125 </varlistentry>\r
126 </variablelist>\r
127 <simpara>See <xref linkend="git-diff(1)" /> for the full list of supported options.</simpara>\r
128 </simplesect>\r
129 <simplesect id="_config_variables">\r
130 <title>CONFIG VARIABLES</title>\r
131 <simpara><emphasis>git difftool</emphasis> falls back to <emphasis>git mergetool</emphasis> config variables when the\r
132 difftool equivalents have not been defined.</simpara>\r
133 <variablelist>\r
134 <varlistentry>\r
135 <term>\r
136 diff.tool\r
137 </term>\r
138 <listitem>\r
139 <simpara>\r
140         The default diff tool to use.\r
141 </simpara>\r
142 </listitem>\r
143 </varlistentry>\r
144 <varlistentry>\r
145 <term>\r
146 diff.guitool\r
147 </term>\r
148 <listitem>\r
149 <simpara>\r
150         The default diff tool to use when <emphasis>--gui</emphasis> is specified.\r
151 </simpara>\r
152 </listitem>\r
153 </varlistentry>\r
154 <varlistentry>\r
155 <term>\r
156 difftool.&lt;tool&gt;.path\r
157 </term>\r
158 <listitem>\r
159 <simpara>\r
160         Override the path for the given tool.  This is useful in case\r
161         your tool is not in the PATH.\r
162 </simpara>\r
163 </listitem>\r
164 </varlistentry>\r
165 <varlistentry>\r
166 <term>\r
167 difftool.&lt;tool&gt;.cmd\r
168 </term>\r
169 <listitem>\r
170 <simpara>\r
171         Specify the command to invoke the specified diff tool.\r
172 </simpara>\r
173 <simpara>See the <emphasis>--tool=&lt;tool&gt;</emphasis> option above for more details.</simpara>\r
174 </listitem>\r
175 </varlistentry>\r
176 <varlistentry>\r
177 <term>\r
178 difftool.prompt\r
179 </term>\r
180 <listitem>\r
181 <simpara>\r
182         Prompt before each invocation of the diff tool.\r
183 </simpara>\r
184 </listitem>\r
185 </varlistentry>\r
186 </variablelist>\r
187 </simplesect>\r
188 <simplesect id="_see_also">\r
189 <title>SEE ALSO</title>\r
190 <variablelist>\r
191 <varlistentry>\r
192 <term>\r
193 <xref linkend="git-diff(1)" />\r
194 </term>\r
195 <listitem>\r
196 <simpara>\r
197          Show changes between commits, commit and working tree, etc\r
198 </simpara>\r
199 </listitem>\r
200 </varlistentry>\r
201 <varlistentry>\r
202 <term>\r
203 <xref linkend="git-mergetool(1)" />\r
204 </term>\r
205 <listitem>\r
206 <simpara>\r
207         Run merge conflict resolution tools to resolve merge conflicts\r
208 </simpara>\r
209 </listitem>\r
210 </varlistentry>\r
211 <varlistentry>\r
212 <term>\r
213 <xref linkend="git-config(1)" />\r
214 </term>\r
215 <listitem>\r
216 <simpara>\r
217          Get and set repository or global options\r
218 </simpara>\r
219 </listitem>\r
220 </varlistentry>\r
221 </variablelist>\r
222 </simplesect>\r
223 <simplesect id="_git">\r
224 <title>GIT</title>\r
225 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>\r
226 </simplesect>\r
227 </article>\r