Home Explore Blog CI



git

2nd chunk of `Documentation/config/mergetool.adoc`
51b7c26b15b6c04a629a11a6280f6e74958daf55914ce4950000000100000d4e
 attempt to detect whether `meld` supports `--output`
	by inspecting the output of `meld --help`.  Configuring
	`mergetool.meld.hasOutput` will make Git skip these checks and
	use the configured value instead.  Setting `mergetool.meld.hasOutput`
	to `true` tells Git to unconditionally use the `--output` option,
	and `false` avoids using `--output`.

`mergetool.meld.useAutoMerge`::
	When the `--auto-merge` is given, meld will merge all non-conflicting
	parts automatically, highlight the conflicting parts, and wait for
	user decision.  Setting `mergetool.meld.useAutoMerge` to `true` tells
	Git to unconditionally use the `--auto-merge` option with `meld`.
	Setting this value to `auto` makes git detect whether `--auto-merge`
	is supported and will only use `--auto-merge` when available.  A
	value of `false` avoids using `--auto-merge` altogether, and is the
	default value.

`mergetool.<variant>.layout`::
	Configure the split window layout for vimdiff's _<variant>_, which is any of `vimdiff`,
	`nvimdiff`, `gvimdiff`.
	Upon launching `git mergetool` with `--tool=<variant>` (or without `--tool`
	if `merge.tool` is configured as _<variant>_), Git will consult
	`mergetool.<variant>.layout` to determine the tool's layout. If the
	variant-specific configuration is not available, `vimdiff` ' s is used as
	fallback.  If that too is not available, a default layout with 4 windows
	will be used.  To configure the layout, see the 'BACKEND SPECIFIC HINTS'
ifdef::git-mergetool[]
	section.
endif::[]
ifndef::git-mergetool[]
	section in linkgit:git-mergetool[1].
endif::[]

`mergetool.hideResolved`::
	During a merge, Git will automatically resolve as many conflicts as
	possible and write the `$MERGED` file containing conflict markers around
	any conflicts that it cannot resolve; `$LOCAL` and `$REMOTE` normally
	are the versions of the file from before Git`s conflict
	resolution. This flag causes `$LOCAL` and `$REMOTE` to be overwritten so
	that only the unresolved conflicts are presented to the merge tool. Can
	be configured per-tool via the `mergetool.<tool>.hideResolved`
	configuration variable. Defaults to `false`.

`mergetool.keepBackup`::
	After performing a merge, the original file with conflict markers
	can be saved as a file with a `.orig` extension.  If this variable
	is set to `false` then this file is not preserved.  Defaults to
	`true` (i.e. keep the backup files).

`mergetool.keepTemporaries`::
	When invoking a custom merge tool, Git uses a set of temporary
	files to pass to the tool. If the tool returns an error and this
	variable is set to `true`, then these temporary files will be
	preserved; otherwise, they will be removed after the tool has
	exited. Defaults to `false`.

`mergetool.writeToTemp`::
	Git writes temporary `BASE`, `LOCAL`, and `REMOTE` versions of
	conflicting files in the worktree by default.  Git will attempt
	to use a temporary directory for these files when set `true`.
	Defaults to `false`.

`mergetool.prompt`::
	Prompt before each invocation of the merge resolution program.

`mergetool.guiDefault`::
	Set `true` to use the `merge.guitool` by default (equivalent to
	specifying the `--gui` argument), or `auto` to select `merge.guitool`
	or `merge.tool` depending on the presence of a `DISPLAY` environment
	variable value. The default is `false`, where the `--gui` argument
	must be provided explicitly for the `merge.guitool` to be used.

Title: Merge Tool Configuration Options
Summary
This section outlines various configuration options for merge tools, including settings for meld, vimdiff, and custom tools, as well as options for resolving conflicts, preserving backup files, and customizing the merge process, allowing users to tailor their merge workflow to their specific needs.