Code

fast-import: don't allow 'ls' of path with empty components
[git.git] / Documentation / git-mergetool.txt
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 <tool>::
26 --tool=<tool>::
27         Use the merge resolution program specified by <tool>.
28         Valid merge tools are:
29         kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge,
30         diffuse, tortoisemerge, opendiff, p4merge and araxis.
31 +
32 If a merge resolution program is not specified, 'git mergetool'
33 will use the configuration variable `merge.tool`.  If the
34 configuration variable `merge.tool` is not set, 'git mergetool'
35 will pick a suitable default.
36 +
37 You can explicitly provide a full path to the tool by setting the
38 configuration variable `mergetool.<tool>.path`. For example, you
39 can configure the absolute path to kdiff3 by setting
40 `mergetool.kdiff3.path`. Otherwise, 'git mergetool' assumes the
41 tool is available in PATH.
42 +
43 Instead of running one of the known merge tool programs,
44 'git mergetool' can be customized to run an alternative program
45 by specifying the command line to invoke in a configuration
46 variable `mergetool.<tool>.cmd`.
47 +
48 When 'git mergetool' is invoked with this tool (either through the
49 `-t` or `--tool` option or the `merge.tool` configuration
50 variable) the configured command line will be invoked with `$BASE`
51 set to the name of a temporary file containing the common base for
52 the merge, if available; `$LOCAL` set to the name of a temporary
53 file containing the contents of the file on the current branch;
54 `$REMOTE` set to the name of a temporary file containing the
55 contents of the file to be merged, and `$MERGED` set to the name
56 of the file to which the merge tool should write the result of the
57 merge resolution.
58 +
59 If the custom merge tool correctly indicates the success of a
60 merge resolution with its exit code, then the configuration
61 variable `mergetool.<tool>.trustExitCode` can be set to `true`.
62 Otherwise, 'git mergetool' will prompt the user to indicate the
63 success of the resolution after the custom tool has exited.
65 -y::
66 --no-prompt::
67         Don't prompt before each invocation of the merge resolution
68         program.
70 --prompt::
71         Prompt before each invocation of the merge resolution program.
72         This is the default behaviour; the option is provided to
73         override any configuration settings.
75 TEMPORARY FILES
76 ---------------
77 `git mergetool` creates `*.orig` backup files while resolving merges.
78 These are safe to remove once a file has been merged and its
79 `git mergetool` session has completed.
81 Setting the `mergetool.keepBackup` configuration variable to `false`
82 causes `git mergetool` to automatically remove the backup as files
83 are successfully merged.
85 Author
86 ------
87 Written by Theodore Y Ts'o <tytso@mit.edu>
89 Documentation
90 --------------
91 Documentation by Theodore Y Ts'o.
93 GIT
94 ---
95 Part of the linkgit:git[1] suite