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