contrib/vim: change URL to point to the latest syntax files
[git/trast.git] / Documentation / git-mergetool.txt
blob4c0ffec507185dfe1e88683e1a23066089571d2c
1 git-mergetool(1)
2 ================
4 NAME
5 ----
6 git-mergetool - Run merge conflict resolution tools to resolve merge conflicts
8 SYNOPSIS
9 --------
10 'git mergetool' [--tool=<tool>] [-y|--no-prompt|--prompt] [<file>]...
12 DESCRIPTION
13 -----------
15 Use `git mergetool` to run one of several merge utilities to resolve
16 merge conflicts.  It is typically run after 'git-merge'.
18 If one or more <file> parameters are given, the merge tool program will
19 be run to resolve differences on each file.  If no <file> names are
20 specified, 'git-mergetool' will run the merge tool program on every file
21 with merge conflicts.
23 OPTIONS
24 -------
25 -t or --tool=<tool>::
26         Use the merge resolution program specified by <tool>.
27         Valid merge tools are:
28         kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge, and opendiff
30 If a merge resolution program is not specified, 'git-mergetool'
31 will use the configuration variable `merge.tool`.  If the
32 configuration variable `merge.tool` is not set, 'git-mergetool'
33 will pick a suitable default.
35 You can explicitly provide a full path to the tool by setting the
36 configuration variable `mergetool.<tool>.path`. For example, you
37 can configure the absolute path to kdiff3 by setting
38 `mergetool.kdiff3.path`. Otherwise, 'git-mergetool' assumes the
39 tool is available in PATH.
41 Instead of running one of the known merge tool programs,
42 'git-mergetool' can be customized to run an alternative program
43 by specifying the command line to invoke in a configuration
44 variable `mergetool.<tool>.cmd`.
46 When 'git-mergetool' is invoked with this tool (either through the
47 `-t` or `--tool` option or the `merge.tool` configuration
48 variable) the configured command line will be invoked with `$BASE`
49 set to the name of a temporary file containing the common base for
50 the merge, if available; `$LOCAL` set to the name of a temporary
51 file containing the contents of the file on the current branch;
52 `$REMOTE` set to the name of a temporary file containing the
53 contents of the file to be merged, and `$MERGED` set to the name
54 of the file to which the merge tool should write the result of the
55 merge resolution.
57 If the custom merge tool correctly indicates the success of a
58 merge resolution with its exit code, then the configuration
59 variable `mergetool.<tool>.trustExitCode` can be set to `true`.
60 Otherwise, 'git-mergetool' will prompt the user to indicate the
61 success of the resolution after the custom tool has exited.
63 -y or --no-prompt::
64         Don't prompt before each invocation of the merge resolution
65         program.
67 --prompt::
68         Prompt before each invocation of the merge resolution program.
69         This is the default behaviour; the option is provided to
70         override any configuration settings.
72 Author
73 ------
74 Written by Theodore Y Ts'o <tytso@mit.edu>
76 Documentation
77 --------------
78 Documentation by Theodore Y Ts'o.
80 GIT
81 ---
82 Part of the linkgit:git[1] suite