2 .\" Title: git-difftool
3 .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
7 .\" Source: Git 2.35.1.225.ge2ac9141e6
10 .TH "GIT\-DIFFTOOL" "1" "02/17/2022" "Git 2\&.35\&.1\&.225\&.ge2ac91" "Git Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 git-difftool \- Show changes using common diff tools
35 \fIgit difftool\fR [<options>] [<commit> [<commit>]] [\-\-] [<path>\&...]
40 \fIgit difftool\fR is a Git command that allows you to compare and edit files between revisions using common diff tools\&. \fIgit difftool\fR is a frontend to \fIgit diff\fR and accepts the same options and arguments\&. See \fBgit-diff\fR(1)\&.
45 Copy the modified files to a temporary location and perform a directory diff on them\&. This mode never prompts before launching the diff tool\&.
50 Do not prompt before launching a diff tool\&.
55 Prompt before each invocation of the diff tool\&. This is the default behaviour; the option is provided to override any configuration settings\&.
60 Start showing the diff for the given path, the paths before it will move to end and output\&.
65 Start showing the diff for the given path, skipping all the paths before it\&.
68 \-t <tool>, \-\-tool=<tool>
70 Use the diff tool specified by <tool>\&. Valid values include emerge, kompare, meld, and vimdiff\&. Run
71 \fBgit difftool \-\-tool\-help\fR
72 for the list of valid <tool> settings\&.
74 If a diff tool is not specified,
76 will use the configuration variable
77 \fBdiff\&.tool\fR\&. If the configuration variable
81 will pick a suitable default\&.
83 You can explicitly provide a full path to the tool by setting the configuration variable
84 \fBdifftool\&.<tool>\&.path\fR\&. For example, you can configure the absolute path to kdiff3 by setting
85 \fBdifftool\&.kdiff3\&.path\fR\&. Otherwise,
87 assumes the tool is available in PATH\&.
89 Instead of running one of the known diff tools,
91 can be customized to run an alternative program by specifying the command line to invoke in a configuration variable
92 \fBdifftool\&.<tool>\&.cmd\fR\&.
96 is invoked with this tool (either through the
102 configuration variable) the configured command line will be invoked with the following variables available:
104 is set to the name of the temporary file containing the contents of the diff pre\-image and
106 is set to the name of the temporary file containing the contents of the diff post\-image\&.
108 is the name of the file which is being compared\&.
110 is provided for compatibility with custom merge tool commands and has the same value as
116 Print a list of diff tools that may be used with
122 \fIgit difftool\fR\(aqs default behavior is create symlinks to the working tree when run in
124 mode and the right\-hand side of the comparison yields the same content as the file in the working tree\&.
127 \fB\-\-no\-symlinks\fR
130 to create copies instead\&.
131 \fB\-\-no\-symlinks\fR
132 is the default on Windows\&.
135 \-x <command>, \-\-extcmd=<command>
137 Specify a custom command for viewing diffs\&.
139 ignores the configured defaults and runs
140 \fB$command $LOCAL $REMOTE\fR
141 when this option is specified\&. Additionally,
143 is set in the environment\&.
154 option the default diff tool will be read from the configured
157 \fBdiff\&.tool\fR\&. The
159 option can be used to override this setting\&. If
161 is not set, we will fallback in the order of
162 \fBmerge\&.guitool\fR,
165 until a tool is found\&.
168 \-\-[no\-]trust\-exit\-code
171 invokes a diff tool individually on each file\&. Errors reported by the diff tool are ignored by default\&. Use
172 \fB\-\-trust\-exit\-code\fR
175 exit when an invoked diff tool returns a non\-zero exit code\&.
178 will forward the exit code of the invoked tool when
179 \fB\-\-trust\-exit\-code\fR
183 See \fBgit-diff\fR(1) for the full list of supported options\&.
184 .SH "CONFIG VARIABLES"
186 \fIgit difftool\fR falls back to \fIgit mergetool\fR config variables when the difftool equivalents have not been defined\&.
190 The default diff tool to use\&.
195 The default diff tool to use when
200 difftool\&.<tool>\&.path
202 Override the path for the given tool\&. This is useful in case your tool is not in the PATH\&.
205 difftool\&.<tool>\&.cmd
207 Specify the command to invoke the specified diff tool\&.
210 \fB\-\-tool=<tool>\fR
211 option above for more details\&.
216 Prompt before each invocation of the diff tool\&.
219 difftool\&.trustExitCode
221 Exit difftool if the invoked diff tool returns a non\-zero exit status\&.
224 \fB\-\-trust\-exit\-code\fR
225 option above for more details\&.
231 Show changes between commits, commit and working tree, etc
234 \fBgit-mergetool\fR(1)
236 Run merge conflict resolution tools to resolve merge conflicts
241 Get and set repository or global options
245 Part of the \fBgit\fR(1) suite