summaryrefslogtreecommitdiff
path: root/devdocs/git/git-difftool.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/git/git-difftool.html
new repository
Diffstat (limited to 'devdocs/git/git-difftool.html')
-rw-r--r--devdocs/git/git-difftool.html6
1 files changed, 6 insertions, 0 deletions
diff --git a/devdocs/git/git-difftool.html b/devdocs/git/git-difftool.html
new file mode 100644
index 00000000..317ef144
--- /dev/null
+++ b/devdocs/git/git-difftool.html
@@ -0,0 +1,6 @@
+<h1>git-difftool</h1> <h2 id="_name">Name</h2> <div class="sectionbody"> <p>git-difftool - Show changes using common diff tools</p> </div> <h2 id="_synopsis">Synopsis</h2> <div class="sectionbody"> <div class="verseblock"> <pre class="content" data-language="shell">git difftool [&lt;options&gt;] [&lt;commit&gt; [&lt;commit&gt;]] [--] [&lt;path&gt;…​]</pre> </div> </div> <h2 id="_description">Description</h2> <div class="sectionbody"> <p><code>git difftool</code> is a Git command that allows you to compare and edit files between revisions using common diff tools. <code>git difftool</code> is a frontend to <code>git diff</code> and accepts the same options and arguments. See <a href="git-diff">git-diff[1]</a>.</p> </div> <h2 id="_options">Options</h2> <div class="sectionbody"> <div class="dlist"> <dl> <dt class="hdlist1" id="Documentation/git-difftool.txt--d"> -d </dt> <dt class="hdlist1" id="Documentation/git-difftool.txt---dir-diff"> --dir-diff </dt> <dd> <p>Copy the modified files to a temporary location and perform a directory diff on them. This mode never prompts before launching the diff tool.</p> </dd> <dt class="hdlist1" id="Documentation/git-difftool.txt--y"> -y </dt> <dt class="hdlist1" id="Documentation/git-difftool.txt---no-prompt"> --no-prompt </dt> <dd> <p>Do not prompt before launching a diff tool.</p> </dd> <dt class="hdlist1" id="Documentation/git-difftool.txt---prompt"> --prompt </dt> <dd> <p>Prompt before each invocation of the diff tool. This is the default behaviour; the option is provided to override any configuration settings.</p> </dd> <dt class="hdlist1" id="Documentation/git-difftool.txt---rotate-toltfilegt"> --rotate-to=&lt;file&gt; </dt> <dd> <p>Start showing the diff for the given path, the paths before it will move to the end and output.</p> </dd> <dt class="hdlist1" id="Documentation/git-difftool.txt---skip-toltfilegt"> --skip-to=&lt;file&gt; </dt> <dd> <p>Start showing the diff for the given path, skipping all the paths before it.</p> </dd> <dt class="hdlist1" id="Documentation/git-difftool.txt--tlttoolgt"> -t &lt;tool&gt; </dt> <dt class="hdlist1" id="Documentation/git-difftool.txt---toollttoolgt"> --tool=&lt;tool&gt; </dt> <dd> <p>Use the diff tool specified by &lt;tool&gt;. Valid values include emerge, kompare, meld, and vimdiff. Run <code>git difftool --tool-help</code> for the list of valid &lt;tool&gt; settings.</p> <p>If a diff tool is not specified, <code>git difftool</code> will use the configuration variable <code>diff.tool</code>. If the configuration variable <code>diff.tool</code> is not set, <code>git difftool</code> will pick a suitable default.</p> <p>You can explicitly provide a full path to the tool by setting the configuration variable <code>difftool.&lt;tool&gt;.path</code>. For example, you can configure the absolute path to kdiff3 by setting <code>difftool.kdiff3.path</code>. Otherwise, <code>git difftool</code> assumes the tool is available in PATH.</p> <p>Instead of running one of the known diff tools, <code>git difftool</code> can be customized to run an alternative program by specifying the command line to invoke in a configuration variable <code>difftool.&lt;tool&gt;.cmd</code>.</p> <p>When <code>git difftool</code> is invoked with this tool (either through the <code>-t</code> or <code>--tool</code> option or the <code>diff.tool</code> configuration variable) the configured command line will be invoked with the following variables available: <code>$LOCAL</code> is set to the name of the temporary file containing the contents of the diff pre-image and <code>$REMOTE</code> is set to the name of the temporary file containing the contents of the diff post-image. <code>$MERGED</code> is the name of the file which is being compared. <code>$BASE</code> is provided for compatibility with custom merge tool commands and has the same value as <code>$MERGED</code>.</p> </dd> <dt class="hdlist1" id="Documentation/git-difftool.txt---tool-help"> --tool-help </dt> <dd> <p>Print a list of diff tools that may be used with <code>--tool</code>.</p> </dd> <dt class="hdlist1" id="Documentation/git-difftool.txt---no-symlinks"> --[no-]symlinks </dt> <dd> <p><code>git difftool</code>'s default behavior is to create symlinks to the working tree when run in <code>--dir-diff</code> mode and the right-hand side of the comparison yields the same content as the file in the working tree.</p> <p>Specifying <code>--no-symlinks</code> instructs <code>git difftool</code> to create copies instead. <code>--no-symlinks</code> is the default on Windows.</p> </dd> <dt class="hdlist1" id="Documentation/git-difftool.txt--xltcommandgt"> -x &lt;command&gt; </dt> <dt class="hdlist1" id="Documentation/git-difftool.txt---extcmdltcommandgt"> --extcmd=&lt;command&gt; </dt> <dd> <p>Specify a custom command for viewing diffs. <code>git-difftool</code> ignores the configured defaults and runs <code>$command $LOCAL $REMOTE</code> when this option is specified. Additionally, <code>$BASE</code> is set in the environment.</p> </dd> <dt class="hdlist1" id="Documentation/git-difftool.txt--g"> -g </dt> <dt class="hdlist1" id="Documentation/git-difftool.txt---no-gui"> --[no-]gui </dt> <dd> <p>When <code>git-difftool</code> is invoked with the <code>-g</code> or <code>--gui</code> option the default diff tool will be read from the configured <code>diff.guitool</code> variable instead of <code>diff.tool</code>. This may be selected automatically using the configuration variable <code>difftool.guiDefault</code>. The <code>--no-gui</code> option can be used to override these settings. If <code>diff.guitool</code> is not set, we will fallback in the order of <code>merge.guitool</code>, <code>diff.tool</code>, <code>merge.tool</code> until a tool is found.</p> </dd> <dt class="hdlist1" id="Documentation/git-difftool.txt---no-trust-exit-code"> --[no-]trust-exit-code </dt> <dd> <p><code>git-difftool</code> invokes a diff tool individually on each file. Errors reported by the diff tool are ignored by default. Use <code>--trust-exit-code</code> to make <code>git-difftool</code> exit when an invoked diff tool returns a non-zero exit code.</p> <p><code>git-difftool</code> will forward the exit code of the invoked tool when <code>--trust-exit-code</code> is used.</p> </dd> </dl> </div> <p>See <a href="git-diff">git-diff[1]</a> for the full list of supported options.</p> </div> <h2 id="_configuration">Configuration</h2> <div class="sectionbody"> <p><code>git difftool</code> falls back to <code>git mergetool</code> config variables when the difftool equivalents have not been defined.</p> <p>Everything above this line in this section isn’t included from the <a href="git-config">git-config[1]</a> documentation. The content that follows is the same as what’s found there:</p> <div class="dlist"> <dl> <dt class="hdlist1" id="Documentation/git-difftool.txt-difftool"> diff.tool </dt> <dd> <p>Controls which diff tool is used by <a href="git-difftool">git-difftool[1]</a>. This variable overrides the value configured in <code>merge.tool</code>. The list below shows the valid built-in values. Any other value is treated as a custom diff tool and requires that a corresponding difftool.&lt;tool&gt;.cmd variable is defined.</p> </dd> <dt class="hdlist1" id="Documentation/git-difftool.txt-diffguitool"> diff.guitool </dt> <dd> <p>Controls which diff tool is used by <a href="git-difftool">git-difftool[1]</a> when the -g/--gui flag is specified. This variable overrides the value configured in <code>merge.guitool</code>. The list below shows the valid built-in values. Any other value is treated as a custom diff tool and requires that a corresponding difftool.&lt;guitool&gt;.cmd variable is defined.</p> </dd> <dt class="hdlist1" id="Documentation/git-difftool.txt-difftoollttoolgtcmd"> difftool.&lt;tool&gt;.cmd </dt> <dd> <p>Specify the command to invoke the specified diff tool. The specified command is evaluated in shell with the following variables available: <code>LOCAL</code> is set to the name of the temporary file containing the contents of the diff pre-image and <code>REMOTE</code> is set to the name of the temporary file containing the contents of the diff post-image.</p> <p>See the <code>--tool=&lt;tool&gt;</code> option in <a href="git-difftool">git-difftool[1]</a> for more details.</p> </dd> <dt class="hdlist1" id="Documentation/git-difftool.txt-difftoollttoolgtpath"> difftool.&lt;tool&gt;.path </dt> <dd> <p>Override the path for the given tool. This is useful in case your tool is not in the PATH.</p> </dd> <dt class="hdlist1" id="Documentation/git-difftool.txt-difftooltrustExitCode"> difftool.trustExitCode </dt> <dd> <p>Exit difftool if the invoked diff tool returns a non-zero exit status.</p> <p>See the <code>--trust-exit-code</code> option in <a href="git-difftool">git-difftool[1]</a> for more details.</p> </dd> <dt class="hdlist1" id="Documentation/git-difftool.txt-difftoolprompt"> difftool.prompt </dt> <dd> <p>Prompt before each invocation of the diff tool.</p> </dd> <dt class="hdlist1" id="Documentation/git-difftool.txt-difftoolguiDefault"> difftool.guiDefault </dt> <dd> <p>Set <code>true</code> to use the <code>diff.guitool</code> by default (equivalent to specifying the <code>--gui</code> argument), or <code>auto</code> to select <code>diff.guitool</code> or <code>diff.tool</code> depending on the presence of a <code>DISPLAY</code> environment variable value. The default is <code>false</code>, where the <code>--gui</code> argument must be provided explicitly for the <code>diff.guitool</code> to be used.</p> </dd> </dl> </div> </div> <h2 id="_see_also">See also</h2> <div class="sectionbody"> <div class="dlist"> <dl> <dt class="hdlist1" id="Documentation/git-difftool.txt-ahrefdocsgit-diffgit-diff1a"> <a href="git-diff">git-diff[1]</a> </dt> <dd> <p>Show changes between commits, commit and working tree, etc</p> </dd> <dt class="hdlist1" id="Documentation/git-difftool.txt-ahrefdocsgit-mergetoolgit-mergetool1a"> <a href="git-mergetool">git-mergetool[1]</a> </dt> <dd> <p>Run merge conflict resolution tools to resolve merge conflicts</p> </dd> <dt class="hdlist1" id="Documentation/git-difftool.txt-ahrefdocsgit-configgit-config1a"> <a href="git-config">git-config[1]</a> </dt> <dd> <p>Get and set repository or global options</p> </dd> </dl> </div> </div><div class="_attribution">
+ <p class="_attribution-p">
+ &copy; 2012&ndash;2024 Scott Chacon and others<br>Licensed under the MIT License.<br>
+ <a href="https://git-scm.com/docs/git-difftool" class="_attribution-link">https://git-scm.com/docs/git-difftool</a>
+ </p>
+</div>