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