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