1git-difftool(1) 2=============== 3 4NAME 5---- 6git-difftool - Show changes using common diff tools 7 8SYNOPSIS 9-------- 10'git difftool' [<options>] [<commit> [<commit>]] [--] [<path>...] 11 12DESCRIPTION 13----------- 14'git difftool' is a git command that allows you to compare and edit files 15between revisions using common diff tools. 'git difftool' is a frontend 16to 'git diff' and accepts the same options and arguments. See 17linkgit:git-diff[1]. 18 19OPTIONS 20------- 21-y:: 22--no-prompt:: 23 Do not prompt before launching a diff tool. 24 25--prompt:: 26 Prompt before each invocation of the diff tool. 27 This is the default behaviour; the option is provided to 28 override any configuration settings. 29 30-t <tool>:: 31--tool=<tool>:: 32 Use the diff tool specified by <tool>. 33 Valid merge tools are: 34 kdiff3, kompare, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, 35 ecmerge, diffuse, opendiff, p4merge and araxis. 36+ 37If a diff tool is not specified, 'git difftool' 38will use the configuration variable `diff.tool`. If the 39configuration variable `diff.tool` is not set, 'git difftool' 40will pick a suitable default. 41+ 42You can explicitly provide a full path to the tool by setting the 43configuration variable `difftool.<tool>.path`. For example, you 44can configure the absolute path to kdiff3 by setting 45`difftool.kdiff3.path`. Otherwise, 'git difftool' assumes the 46tool is available in PATH. 47+ 48Instead of running one of the known diff tools, 49'git difftool' can be customized to run an alternative program 50by specifying the command line to invoke in a configuration 51variable `difftool.<tool>.cmd`. 52+ 53When 'git difftool' is invoked with this tool (either through the 54`-t` or `--tool` option or the `diff.tool` configuration variable) 55the configured command line will be invoked with the following 56variables available: `$LOCAL` is set to the name of the temporary 57file containing the contents of the diff pre-image and `$REMOTE` 58is set to the name of the temporary file containing the contents 59of the diff post-image. `$MERGED` is the name of the file which is 60being compared. `$BASE` is provided for compatibility 61with custom merge tool commands and has the same value as `$MERGED`. 62 63-x <command>:: 64--extcmd=<command>:: 65 Specify a custom command for viewing diffs. 66 'git-difftool' ignores the configured defaults and runs 67 `$command $LOCAL $REMOTE` when this option is specified. 68 Additionally, `$BASE` is set in the environment. 69 70-g:: 71--gui:: 72 When 'git-difftool' is invoked with the `-g` or `--gui` option 73 the default diff tool will be read from the configured 74 `diff.guitool` variable instead of `diff.tool`. 75 76See linkgit:git-diff[1] for the full list of supported options. 77 78CONFIG VARIABLES 79---------------- 80'git difftool' falls back to 'git mergetool' config variables when the 81difftool equivalents have not been defined. 82 83diff.tool:: 84 The default diff tool to use. 85 86diff.guitool:: 87 The default diff tool to use when `--gui` is specified. 88 89difftool.<tool>.path:: 90 Override the path for the given tool. This is useful in case 91 your tool is not in the PATH. 92 93difftool.<tool>.cmd:: 94 Specify the command to invoke the specified diff tool. 95+ 96See the `--tool=<tool>` option above for more details. 97 98difftool.prompt:: 99 Prompt before each invocation of the diff tool. 100 101SEE ALSO 102-------- 103linkgit:git-diff[1]:: 104 Show changes between commits, commit and working tree, etc 105 106linkgit:git-mergetool[1]:: 107 Run merge conflict resolution tools to resolve merge conflicts 108 109linkgit:git-config[1]:: 110 Get and set repository or global options 111 112 113AUTHOR 114------ 115Written by David Aguilar <davvid@gmail.com>. 116 117Documentation 118-------------- 119Documentation by David Aguilar and the git-list <git@vger.kernel.org>. 120 121GIT 122--- 123Part of the linkgit:git[1] suite