updated git doc
[TortoiseGit.git] / doc / source / en / TortoiseGit / git_doc / git-mergetool.xml
blobe5e5a104463d4c8df41b5104a8b7cbf247038b74
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-mergetool(1)">\r
5 <articleinfo>\r
6     <title>git-mergetool(1)</title>\r
7 <indexterm>\r
8 <primary>git-mergetool(1)</primary>\r
9 </indexterm>\r
10 </articleinfo>\r
11 <simplesect id="_name">\r
12 <title>NAME</title>\r
13 <simpara>git-mergetool - Run merge conflict resolution tools to resolve merge conflicts</simpara>\r
14 </simplesect>\r
15 <simplesect id="_synopsis">\r
16 <title>SYNOPSIS</title>\r
17 <blockquote>\r
18 <literallayout><emphasis>git mergetool</emphasis> [--tool=&lt;tool&gt;] [-y|--no-prompt|--prompt] [&lt;file&gt;&#8230;]</literallayout>\r
19 </blockquote>\r
20 </simplesect>\r
21 <simplesect id="_description">\r
22 <title>DESCRIPTION</title>\r
23 <simpara>Use <emphasis>git mergetool</emphasis> to run one of several merge utilities to resolve\r
24 merge conflicts.  It is typically run after <emphasis>git merge</emphasis>.</simpara>\r
25 <simpara>If one or more &lt;file&gt; parameters are given, the merge tool program will\r
26 be run to resolve differences on each file (skipping those without\r
27 conflicts).  Specifying a directory will include all unresolved files in\r
28 that path.  If no &lt;file&gt; names are specified, <emphasis>git mergetool</emphasis> will run\r
29 the merge tool program on every file with merge conflicts.</simpara>\r
30 </simplesect>\r
31 <simplesect id="_options">\r
32 <title>OPTIONS</title>\r
33 <variablelist>\r
34 <varlistentry>\r
35 <term>\r
36 -t &lt;tool&gt;\r
37 </term>\r
38 <term>\r
39 --tool=&lt;tool&gt;\r
40 </term>\r
41 <listitem>\r
42 <simpara>\r
43         Use the merge resolution program specified by &lt;tool&gt;.\r
44         Valid merge tools are:\r
45         araxis, bc3, diffuse, ecmerge, emerge, gvimdiff, kdiff3,\r
46         meld, opendiff, p4merge, tkdiff, tortoisemerge, vimdiff and xxdiff.\r
47 </simpara>\r
48 <simpara>If a merge resolution program is not specified, <emphasis>git mergetool</emphasis>\r
49 will use the configuration variable <emphasis>merge.tool</emphasis>.  If the\r
50 configuration variable <emphasis>merge.tool</emphasis> is not set, <emphasis>git mergetool</emphasis>\r
51 will pick a suitable default.</simpara>\r
52 <simpara>You can explicitly provide a full path to the tool by setting the\r
53 configuration variable <emphasis>mergetool.&lt;tool&gt;.path</emphasis>. For example, you\r
54 can configure the absolute path to kdiff3 by setting\r
55 <emphasis>mergetool.kdiff3.path</emphasis>. Otherwise, <emphasis>git mergetool</emphasis> assumes the\r
56 tool is available in PATH.</simpara>\r
57 <simpara>Instead of running one of the known merge tool programs,\r
58 <emphasis>git mergetool</emphasis> can be customized to run an alternative program\r
59 by specifying the command line to invoke in a configuration\r
60 variable <emphasis>mergetool.&lt;tool&gt;.cmd</emphasis>.</simpara>\r
61 <simpara>When <emphasis>git mergetool</emphasis> is invoked with this tool (either through the\r
62 <emphasis>-t</emphasis> or <emphasis>--tool</emphasis> option or the <emphasis>merge.tool</emphasis> configuration\r
63 variable) the configured command line will be invoked with <emphasis>$BASE</emphasis>\r
64 set to the name of a temporary file containing the common base for\r
65 the merge, if available; <emphasis>$LOCAL</emphasis> set to the name of a temporary\r
66 file containing the contents of the file on the current branch;\r
67 <emphasis>$REMOTE</emphasis> set to the name of a temporary file containing the\r
68 contents of the file to be merged, and <emphasis>$MERGED</emphasis> set to the name\r
69 of the file to which the merge tool should write the result of the\r
70 merge resolution.</simpara>\r
71 <simpara>If the custom merge tool correctly indicates the success of a\r
72 merge resolution with its exit code, then the configuration\r
73 variable <emphasis>mergetool.&lt;tool&gt;.trustExitCode</emphasis> can be set to <emphasis>true</emphasis>.\r
74 Otherwise, <emphasis>git mergetool</emphasis> will prompt the user to indicate the\r
75 success of the resolution after the custom tool has exited.</simpara>\r
76 </listitem>\r
77 </varlistentry>\r
78 <varlistentry>\r
79 <term>\r
80 -y\r
81 </term>\r
82 <term>\r
83 --no-prompt\r
84 </term>\r
85 <listitem>\r
86 <simpara>\r
87         Don't prompt before each invocation of the merge resolution\r
88         program.\r
89 </simpara>\r
90 </listitem>\r
91 </varlistentry>\r
92 <varlistentry>\r
93 <term>\r
94 --prompt\r
95 </term>\r
96 <listitem>\r
97 <simpara>\r
98         Prompt before each invocation of the merge resolution program.\r
99         This is the default behaviour; the option is provided to\r
100         override any configuration settings.\r
101 </simpara>\r
102 </listitem>\r
103 </varlistentry>\r
104 </variablelist>\r
105 </simplesect>\r
106 <simplesect id="_temporary_files">\r
107 <title>TEMPORARY FILES</title>\r
108 <simpara><emphasis>git mergetool</emphasis> creates <emphasis>*.orig</emphasis> backup files while resolving merges.\r
109 These are safe to remove once a file has been merged and its\r
110 <emphasis>git mergetool</emphasis> session has completed.</simpara>\r
111 <simpara>Setting the <emphasis>mergetool.keepBackup</emphasis> configuration variable to <emphasis>false</emphasis>\r
112 causes <emphasis>git mergetool</emphasis> to automatically remove the backup as files\r
113 are successfully merged.</simpara>\r
114 </simplesect>\r
115 <simplesect id="_git">\r
116 <title>GIT</title>\r
117 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>\r
118 </simplesect>\r
119 </article>\r