1git-mergetool(1) 2================ 3 4NAME 5---- 6git-mergetool - Run merge conflict resolution tools to resolve merge conflicts 7 8SYNOPSIS 9-------- 10'git mergetool' [--tool=<tool>] [-y|--no-prompt|--prompt] [<file>]... 11 12DESCRIPTION 13----------- 14 15Use `git mergetool` to run one of several merge utilities to resolve 16merge conflicts. It is typically run after 'git-merge'. 17 18If one or more <file> parameters are given, the merge tool program will 19be run to resolve differences on each file. If no <file> names are 20specified, 'git-mergetool' will run the merge tool program on every file 21with merge conflicts. 22 23OPTIONS 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 29+ 30If a merge resolution program is not specified, 'git-mergetool' 31will use the configuration variable `merge.tool`. If the 32configuration variable `merge.tool` is not set, 'git-mergetool' 33will pick a suitable default. 34+ 35You can explicitly provide a full path to the tool by setting the 36configuration variable `mergetool.<tool>.path`. For example, you 37can configure the absolute path to kdiff3 by setting 38`mergetool.kdiff3.path`. Otherwise, 'git-mergetool' assumes the 39tool is available in PATH. 40+ 41Instead of running one of the known merge tool programs, 42'git-mergetool' can be customized to run an alternative program 43by specifying the command line to invoke in a configuration 44variable `mergetool.<tool>.cmd`. 45+ 46When 'git-mergetool' is invoked with this tool (either through the 47`-t` or `--tool` option or the `merge.tool` configuration 48variable) the configured command line will be invoked with `$BASE` 49set to the name of a temporary file containing the common base for 50the merge, if available; `$LOCAL` set to the name of a temporary 51file containing the contents of the file on the current branch; 52`$REMOTE` set to the name of a temporary file containing the 53contents of the file to be merged, and `$MERGED` set to the name 54of the file to which the merge tool should write the result of the 55merge resolution. 56+ 57If the custom merge tool correctly indicates the success of a 58merge resolution with its exit code, then the configuration 59variable `mergetool.<tool>.trustExitCode` can be set to `true`. 60Otherwise, 'git-mergetool' will prompt the user to indicate the 61success of the resolution after the custom tool has exited. 62 63-y or --no-prompt:: 64 Don't prompt before each invocation of the merge resolution 65 program. 66 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. 71 72Author 73------ 74Written by Theodore Y Ts'o <tytso@mit.edu> 75 76Documentation 77-------------- 78Documentation by Theodore Y Ts'o. 79 80GIT 81--- 82Part of the linkgit:git[1] suite