Documentation / git-difftool.txton commit dir.c: unify is_excluded and is_path_excluded APIs (95c6f27)
   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>.  Valid values include
  40        emerge, kompare, meld, and vimdiff. Run `git difftool --tool-help`
  41        for the list of valid <tool> settings.
  42+
  43If a diff tool is not specified, 'git difftool'
  44will use the configuration variable `diff.tool`.  If the
  45configuration variable `diff.tool` is not set, 'git difftool'
  46will pick a suitable default.
  47+
  48You can explicitly provide a full path to the tool by setting the
  49configuration variable `difftool.<tool>.path`. For example, you
  50can configure the absolute path to kdiff3 by setting
  51`difftool.kdiff3.path`. Otherwise, 'git difftool' assumes the
  52tool is available in PATH.
  53+
  54Instead of running one of the known diff tools,
  55'git difftool' can be customized to run an alternative program
  56by specifying the command line to invoke in a configuration
  57variable `difftool.<tool>.cmd`.
  58+
  59When 'git difftool' is invoked with this tool (either through the
  60`-t` or `--tool` option or the `diff.tool` configuration variable)
  61the configured command line will be invoked with the following
  62variables available: `$LOCAL` is set to the name of the temporary
  63file containing the contents of the diff pre-image and `$REMOTE`
  64is set to the name of the temporary file containing the contents
  65of the diff post-image.  `$MERGED` is the name of the file which is
  66being compared. `$BASE` is provided for compatibility
  67with custom merge tool commands and has the same value as `$MERGED`.
  68
  69--tool-help::
  70        Print a list of diff tools that may be used with `--tool`.
  71
  72--symlinks::
  73--no-symlinks::
  74        'git difftool''s default behavior is create symlinks to the
  75        working tree when run in `--dir-diff` mode and the right-hand
  76        side of the comparison yields the same content as the file in
  77        the working tree.
  78+
  79Specifying `--no-symlinks` instructs 'git difftool' to create copies
  80instead.  `--no-symlinks` is the default on Windows.
  81
  82-x <command>::
  83--extcmd=<command>::
  84        Specify a custom command for viewing diffs.
  85        'git-difftool' ignores the configured defaults and runs
  86        `$command $LOCAL $REMOTE` when this option is specified.
  87        Additionally, `$BASE` is set in the environment.
  88
  89-g::
  90--gui::
  91        When 'git-difftool' is invoked with the `-g` or `--gui` option
  92        the default diff tool will be read from the configured
  93        `diff.guitool` variable instead of `diff.tool`.
  94
  95See linkgit:git-diff[1] for the full list of supported options.
  96
  97CONFIG VARIABLES
  98----------------
  99'git difftool' falls back to 'git mergetool' config variables when the
 100difftool equivalents have not been defined.
 101
 102diff.tool::
 103        The default diff tool to use.
 104
 105diff.guitool::
 106        The default diff tool to use when `--gui` is specified.
 107
 108difftool.<tool>.path::
 109        Override the path for the given tool.  This is useful in case
 110        your tool is not in the PATH.
 111
 112difftool.<tool>.cmd::
 113        Specify the command to invoke the specified diff tool.
 114+
 115See the `--tool=<tool>` option above for more details.
 116
 117difftool.prompt::
 118        Prompt before each invocation of the diff tool.
 119
 120SEE ALSO
 121--------
 122linkgit:git-diff[1]::
 123         Show changes between commits, commit and working tree, etc
 124
 125linkgit:git-mergetool[1]::
 126        Run merge conflict resolution tools to resolve merge conflicts
 127
 128linkgit:git-config[1]::
 129         Get and set repository or global options
 130
 131GIT
 132---
 133Part of the linkgit:git[1] suite