<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect2 SYSTEM "../../../dtd/dblite.dtd">

<sect2 lang="en" id="git-merge(1)">
    <title>git-merge(1)</title>
    <date>2024-07-02</date>
<revhistory><revision><date>2024-07-02</date></revision></revhistory>
<indexterm>
<primary>git-merge(1)</primary>
</indexterm>
<simplesect id="git-merge(1)__name">
<title>NAME</title>
<simpara>git-merge - Join two or more development histories together</simpara>
</simplesect>
<simplesect id="git-merge(1)__synopsis">
<title>SYNOPSIS</title>
<blockquote>
<literallayout><emphasis>git merge</emphasis> [-n] [--stat] [--no-commit] [--squash] [--[no-]edit]
        [--no-verify] [-s &lt;strategy&gt;] [-X &lt;strategy-option&gt;] [-S[&lt;keyid&gt;]]
        [--[no-]allow-unrelated-histories]
        [--[no-]rerere-autoupdate] [-m &lt;msg&gt;] [-F &lt;file&gt;]
        [--into-name &lt;branch&gt;] [&lt;commit&gt;&#8230;]
<emphasis>git merge</emphasis> (--continue | --abort | --quit)</literallayout>
</blockquote>
</simplesect>
<simplesect id="git-merge(1)__description">
<title>DESCRIPTION</title>
<simpara>Incorporates changes from the named commits (since the time their
histories diverged from the current branch) into the current
branch.  This command is used by <emphasis>git pull</emphasis> to incorporate changes
from another repository and can be used by hand to merge changes
from one branch into another.</simpara>
<simpara>Assume the following history exists and the current branch is
<emphasis>master</emphasis>:</simpara>
<screen>          A---B---C topic
         /
    D---E---F---G master</screen>
<simpara>Then <emphasis>git merge topic</emphasis> will replay the changes made on the
<emphasis>topic</emphasis> branch since it diverged from <emphasis>master</emphasis> (i.e., <emphasis>E</emphasis>) until
its current commit (<emphasis>C</emphasis>) on top of <emphasis>master</emphasis>, and record the result
in a new commit along with the names of the two parent commits and
a log message from the user describing the changes. Before the operation,
<emphasis>ORIG_HEAD</emphasis> is set to the tip of the current branch (<emphasis>C</emphasis>).</simpara>
<screen>          A---B---C topic
         /         \
    D---E---F---G---H master</screen>
<simpara>A merge stops if there's a conflict that cannot be resolved
automatically or if <emphasis>--no-commit</emphasis> was provided when initiating the
merge. At that point you can run <emphasis>git merge --abort</emphasis> or <emphasis>git merge
--continue</emphasis>.</simpara>
<simpara><emphasis>git merge --abort</emphasis> will abort the merge process and try to reconstruct
the pre-merge state. However, if there were uncommitted changes when the
merge started (and especially if those changes were further modified
after the merge was started), <emphasis>git merge --abort</emphasis> will in some cases be
unable to reconstruct the original (pre-merge) changes. Therefore:</simpara>
<simpara><emphasis role="strong">Warning</emphasis>: Running <emphasis>git merge</emphasis> with non-trivial uncommitted changes is
discouraged: while possible, it may leave you in a state that is hard to
back out of in the case of a conflict.</simpara>
</simplesect>
<simplesect id="git-merge(1)__options">
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term>
--commit
</term>
<term>
--no-commit
</term>
<listitem>
<simpara>
        Perform the merge and commit the result. This option can
        be used to override --no-commit.
</simpara>
<simpara>With --no-commit perform the merge and stop just before creating
a merge commit, to give the user a chance to inspect and further
tweak the merge result before committing.</simpara>
<simpara>Note that fast-forward updates do not create a merge commit and
therefore there is no way to stop those merges with --no-commit.
Thus, if you want to ensure your branch is not changed or updated
by the merge command, use --no-ff with --no-commit.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--edit
</term>
<term>
-e
</term>
<term>
--no-edit
</term>
<listitem>
<simpara>
        Invoke an editor before committing successful mechanical merge to
        further edit the auto-generated merge message, so that the user
        can explain and justify the merge. The <emphasis>--no-edit</emphasis> option can be
        used to accept the auto-generated message (this is generally
        discouraged).
The <emphasis>--edit</emphasis> (or <emphasis>-e</emphasis>) option is still useful if you are
giving a draft message with the <emphasis>-m</emphasis> option from the command line
and want to edit it in the editor.
</simpara>
<simpara>Older scripts may depend on the historical behaviour of not allowing the
user to edit the merge log message. They will see an editor opened when
they run <emphasis>git merge</emphasis>. To make it easier to adjust such scripts to the
updated behaviour, the environment variable <emphasis>GIT_MERGE_AUTOEDIT</emphasis> can be
set to <emphasis>no</emphasis> at the beginning of them.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--cleanup=&lt;mode&gt;
</term>
<listitem>
<simpara>
        This option determines how the merge message will be cleaned up before
        committing. See <xref linkend="git-commit(1)" /> for more details. In addition, if
        the <emphasis>&lt;mode&gt;</emphasis> is given a value of <emphasis>scissors</emphasis>, scissors will be appended
        to <emphasis>MERGE_MSG</emphasis> before being passed on to the commit machinery in the
        case of a merge conflict.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--ff
</term>
<term>
--no-ff
</term>
<term>
--ff-only
</term>
<listitem>
<simpara>
        Specifies how a merge is handled when the merged-in history is
        already a descendant of the current history.  <emphasis>--ff</emphasis> is the
        default unless merging an annotated (and possibly signed) tag
        that is not stored in its natural place in the <emphasis>refs/tags/</emphasis>
        hierarchy, in which case <emphasis>--no-ff</emphasis> is assumed.
</simpara>
<simpara>With <emphasis>--ff</emphasis>, when possible resolve the merge as a fast-forward (only
update the branch pointer to match the merged branch; do not create a
merge commit).  When not possible (when the merged-in history is not a
descendant of the current history), create a merge commit.</simpara>
<simpara>With <emphasis>--no-ff</emphasis>, create a merge commit in all cases, even when the merge
could instead be resolved as a fast-forward.</simpara>
<simpara>With <emphasis>--ff-only</emphasis>, resolve the merge as a fast-forward when possible.
When not possible, refuse to merge and exit with a non-zero status.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-S[&lt;keyid&gt;]
</term>
<term>
--gpg-sign[=&lt;keyid&gt;]
</term>
<term>
--no-gpg-sign
</term>
<listitem>
<simpara>
        GPG-sign the resulting merge commit. The <emphasis>keyid</emphasis> argument is
        optional and defaults to the committer identity; if specified,
        it must be stuck to the option without a space. <emphasis>--no-gpg-sign</emphasis>
        is useful to countermand both <emphasis>commit.gpgSign</emphasis> configuration variable,
        and earlier <emphasis>--gpg-sign</emphasis>.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--log[=&lt;n&gt;]
</term>
<term>
--no-log
</term>
<listitem>
<simpara>
        In addition to branch names, populate the log message with
        one-line descriptions from at most &lt;n&gt; actual commits that are being
        merged. See also <xref linkend="git-fmt-merge-msg(1)" />.
</simpara>
<simpara>With --no-log do not list one-line descriptions from the
actual commits being merged.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--signoff
</term>
<term>
--no-signoff
</term>
<listitem>
<simpara>
        Add a <emphasis>Signed-off-by</emphasis> trailer by the committer at the end of the commit
        log message.  The meaning of a signoff depends on the project
        to which you're committing.  For example, it may certify that
        the committer has the rights to submit the work under the
        project's license or agrees to some contributor representation,
        such as a Developer Certificate of Origin.
        (See <ulink url="https://developercertificate.org">https://developercertificate.org</ulink> for the one used by the
        Linux kernel and Git projects.)  Consult the documentation or
        leadership of the project to which you're contributing to
        understand how the signoffs are used in that project.
</simpara>
<simpara>The --no-signoff option can be used to countermand an earlier --signoff
option on the command line.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--stat
</term>
<term>
-n
</term>
<term>
--no-stat
</term>
<listitem>
<simpara>
        Show a diffstat at the end of the merge. The diffstat is also
        controlled by the configuration option merge.stat.
</simpara>
<simpara>With -n or --no-stat do not show a diffstat at the end of the
merge.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--squash
</term>
<term>
--no-squash
</term>
<listitem>
<simpara>
        Produce the working tree and index state as if a real merge
        happened (except for the merge information), but do not actually
        make a commit, move the <emphasis>HEAD</emphasis>, or record <emphasis>$GIT_DIR/MERGE_HEAD</emphasis>
        (to cause the next <emphasis>git commit</emphasis> command to create a merge
        commit).  This allows you to create a single commit on top of
        the current branch whose effect is the same as merging another
        branch (or more in case of an octopus).
</simpara>
<simpara>With --no-squash perform the merge and commit the result. This
option can be used to override --squash.</simpara>
<simpara>With --squash, --commit is not allowed, and will fail.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--[no-]verify
</term>
<listitem>
<simpara>
        By default, the pre-merge and commit-msg hooks are run.
        When <emphasis>--no-verify</emphasis> is given, these are bypassed.
        See also <xref linkend="githooks(5)" />.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-s &lt;strategy&gt;
</term>
<term>
--strategy=&lt;strategy&gt;
</term>
<listitem>
<simpara>
        Use the given merge strategy; can be supplied more than
        once to specify them in the order they should be tried.
        If there is no <emphasis>-s</emphasis> option, a built-in list of strategies
        is used instead (<emphasis>ort</emphasis> when merging a single head,
        <emphasis>octopus</emphasis> otherwise).
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-X &lt;option&gt;
</term>
<term>
--strategy-option=&lt;option&gt;
</term>
<listitem>
<simpara>
        Pass merge strategy specific option through to the merge
        strategy.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--verify-signatures
</term>
<term>
--no-verify-signatures
</term>
<listitem>
<simpara>
        Verify that the tip commit of the side branch being merged is
        signed with a valid key, i.e. a key that has a valid uid: in the
        default trust model, this means the signing key has been signed by
        a trusted key.  If the tip commit of the side branch is not signed
        with a valid key, the merge is aborted.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--summary
</term>
<term>
--no-summary
</term>
<listitem>
<simpara>
        Synonyms to --stat and --no-stat; these are deprecated and will be
        removed in the future.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-q
</term>
<term>
--quiet
</term>
<listitem>
<simpara>
        Operate quietly. Implies --no-progress.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-v
</term>
<term>
--verbose
</term>
<listitem>
<simpara>
        Be verbose.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--progress
</term>
<term>
--no-progress
</term>
<listitem>
<simpara>
        Turn progress on/off explicitly. If neither is specified,
        progress is shown if standard error is connected to a terminal.
        Note that not all merge strategies may support progress
        reporting.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--autostash
</term>
<term>
--no-autostash
</term>
<listitem>
<simpara>
        Automatically create a temporary stash entry before the operation
        begins, record it in the ref <emphasis>MERGE_AUTOSTASH</emphasis>
        and apply it after the operation ends.  This means
        that you can run the operation on a dirty worktree.  However, use
        with care: the final stash application after a successful
        merge might result in non-trivial conflicts.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--allow-unrelated-histories
</term>
<listitem>
<simpara>
        By default, <emphasis>git merge</emphasis> command refuses to merge histories
        that do not share a common ancestor.  This option can be
        used to override this safety when merging histories of two
        projects that started their lives independently. As that is
        a very rare occasion, no configuration variable to enable
        this by default exists and will not be added.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-m &lt;msg&gt;
</term>
<listitem>
<simpara>
        Set the commit message to be used for the merge commit (in
        case one is created).
</simpara>
<simpara>If <emphasis>--log</emphasis> is specified, a shortlog of the commits being merged
will be appended to the specified message.</simpara>
<simpara>The <emphasis>git fmt-merge-msg</emphasis> command can be
used to give a good default for automated <emphasis>git merge</emphasis>
invocations. The automated message can include the branch description.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--into-name &lt;branch&gt;
</term>
<listitem>
<simpara>
        Prepare the default merge message as if merging to the branch
        <emphasis>&lt;branch&gt;</emphasis>, instead of the name of the real branch to which
        the merge is made.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-F &lt;file&gt;
</term>
<term>
--file=&lt;file&gt;
</term>
<listitem>
<simpara>
        Read the commit message to be used for the merge commit (in
        case one is created).
</simpara>
<simpara>If <emphasis>--log</emphasis> is specified, a shortlog of the commits being merged
will be appended to the specified message.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--rerere-autoupdate
</term>
<term>
--no-rerere-autoupdate
</term>
<listitem>
<simpara>
        After the rerere mechanism reuses a recorded resolution on
        the current conflict to update the files in the working
        tree, allow it to also update the index with the result of
        resolution.  <emphasis>--no-rerere-autoupdate</emphasis> is a good way to
        double-check what <emphasis>rerere</emphasis> did and catch potential
        mismerges, before committing the result to the index with a
        separate <emphasis>git add</emphasis>.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--overwrite-ignore
</term>
<term>
--no-overwrite-ignore
</term>
<listitem>
<simpara>
        Silently overwrite ignored files from the merge result. This
        is the default behavior. Use <emphasis>--no-overwrite-ignore</emphasis> to abort.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--abort
</term>
<listitem>
<simpara>
        Abort the current conflict resolution process, and
        try to reconstruct the pre-merge state. If an autostash entry is
        present, apply it to the worktree.
</simpara>
<simpara>If there were uncommitted worktree changes present when the merge
started, <emphasis>git merge --abort</emphasis> will in some cases be unable to
reconstruct these changes. It is therefore recommended to always
commit or stash your changes before running <emphasis>git merge</emphasis>.</simpara>
<simpara><emphasis>git merge --abort</emphasis> is equivalent to <emphasis>git reset --merge</emphasis> when
<emphasis>MERGE_HEAD</emphasis> is present unless <emphasis>MERGE_AUTOSTASH</emphasis> is also present in
which case <emphasis>git merge --abort</emphasis> applies the stash entry to the worktree
whereas <emphasis>git reset --merge</emphasis> will save the stashed changes in the stash
list.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--quit
</term>
<listitem>
<simpara>
        Forget about the current merge in progress. Leave the index
        and the working tree as-is. If <emphasis>MERGE_AUTOSTASH</emphasis> is present, the
        stash entry will be saved to the stash list.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--continue
</term>
<listitem>
<simpara>
        After a <emphasis>git merge</emphasis> stops due to conflicts you can conclude the
        merge by running <emphasis>git merge --continue</emphasis> (see "HOW TO RESOLVE
        CONFLICTS" section below).
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
&lt;commit&gt;&#8230;
</term>
<listitem>
<simpara>
        Commits, usually other branch heads, to merge into our branch.
        Specifying more than one commit will create a merge with
        more than two parents (affectionately called an Octopus merge).
</simpara>
<simpara>If no commit is given from the command line, merge the remote-tracking
branches that the current branch is configured to use as its upstream.
See also the configuration section of this manual page.</simpara>
<simpara>When <emphasis>FETCH_HEAD</emphasis> (and no other commit) is specified, the branches
recorded in the <emphasis>.git/FETCH_HEAD</emphasis> file by the previous invocation
of <emphasis>git fetch</emphasis> for merging are merged to the current branch.</simpara>
</listitem>
</varlistentry>
</variablelist>
</simplesect>
<simplesect id="git-merge(1)__pre_merge_checks">
<title>PRE-MERGE CHECKS</title>
<simpara>Before applying outside changes, you should get your own work in
good shape and committed locally, so it will not be clobbered if
there are conflicts.  See also <xref linkend="git-stash(1)" />.
<emphasis>git pull</emphasis> and <emphasis>git merge</emphasis> will stop without doing anything when
local uncommitted changes overlap with files that <emphasis>git pull</emphasis>/<emphasis>git
merge</emphasis> may need to update.</simpara>
<simpara>To avoid recording unrelated changes in the merge commit,
<emphasis>git pull</emphasis> and <emphasis>git merge</emphasis> will also abort if there are any changes
registered in the index relative to the <emphasis>HEAD</emphasis> commit.  (Special
narrow exceptions to this rule may exist depending on which merge
strategy is in use, but generally, the index must match HEAD.)</simpara>
<simpara>If all named commits are already ancestors of <emphasis>HEAD</emphasis>, <emphasis>git merge</emphasis>
will exit early with the message "Already up to date."</simpara>
</simplesect>
<simplesect id="git-merge(1)__fast_forward_merge">
<title>FAST-FORWARD MERGE</title>
<simpara>Often the current branch head is an ancestor of the named commit.
This is the most common case especially when invoked from <emphasis>git
pull</emphasis>: you are tracking an upstream repository, you have committed
no local changes, and now you want to update to a newer upstream
revision.  In this case, a new commit is not needed to store the
combined history; instead, the <emphasis>HEAD</emphasis> (along with the index) is
updated to point at the named commit, without creating an extra
merge commit.</simpara>
<simpara>This behavior can be suppressed with the <emphasis>--no-ff</emphasis> option.</simpara>
</simplesect>
<simplesect id="git-merge(1)__true_merge">
<title>TRUE MERGE</title>
<simpara>Except in a fast-forward merge (see above), the branches to be
merged must be tied together by a merge commit that has both of them
as its parents.</simpara>
<simpara>A merged version reconciling the changes from all branches to be
merged is committed, and your <emphasis>HEAD</emphasis>, index, and working tree are
updated to it.  It is possible to have modifications in the working
tree as long as they do not overlap; the update will preserve them.</simpara>
<simpara>When it is not obvious how to reconcile the changes, the following
happens:</simpara>
<orderedlist numeration="arabic">
<listitem>
<simpara>
The <emphasis>HEAD</emphasis> pointer stays the same.
</simpara>
</listitem>
<listitem>
<simpara>
The <emphasis>MERGE_HEAD</emphasis> ref is set to point to the other branch head.
</simpara>
</listitem>
<listitem>
<simpara>
Paths that merged cleanly are updated both in the index file and
   in your working tree.
</simpara>
</listitem>
<listitem>
<simpara>
For conflicting paths, the index file records up to three
   versions: stage 1 stores the version from the common ancestor,
   stage 2 from <emphasis>HEAD</emphasis>, and stage 3 from <emphasis>MERGE_HEAD</emphasis> (you
   can inspect the stages with <emphasis>git ls-files -u</emphasis>).  The working
   tree files contain the result of the merge operation; i.e. 3-way
   merge results with familiar conflict markers <emphasis>&lt;&lt;&lt;</emphasis> <emphasis>===</emphasis> <emphasis>&gt;&gt;&gt;</emphasis>.
</simpara>
</listitem>
<listitem>
<simpara>
A ref named <emphasis>AUTO_MERGE</emphasis> is written, pointing to a tree
   corresponding to the current content of the working tree (including
   conflict markers for textual conflicts).  Note that this ref is only
   written when the <emphasis>ort</emphasis> merge strategy is used (the default).
</simpara>
</listitem>
<listitem>
<simpara>
No other changes are made.  In particular, the local
   modifications you had before you started merge will stay the
   same and the index entries for them stay as they were,
   i.e. matching <emphasis>HEAD</emphasis>.
</simpara>
</listitem>
</orderedlist>
<simpara>If you tried a merge which resulted in complex conflicts and
want to start over, you can recover with <emphasis>git merge --abort</emphasis>.</simpara>
</simplesect>
<simplesect id="git-merge(1)__merging_tag">
<title>MERGING TAG</title>
<simpara>When merging an annotated (and possibly signed) tag, Git always
creates a merge commit even if a fast-forward merge is possible, and
the commit message template is prepared with the tag message.
Additionally, if the tag is signed, the signature check is reported
as a comment in the message template. See also <xref linkend="git-tag(1)" />.</simpara>
<simpara>When you want to just integrate with the work leading to the commit
that happens to be tagged, e.g. synchronizing with an upstream
release point, you may not want to make an unnecessary merge commit.</simpara>
<simpara>In such a case, you can "unwrap" the tag yourself before feeding it
to <emphasis>git merge</emphasis>, or pass <emphasis>--ff-only</emphasis> when you do not have any work on
your own. e.g.</simpara>
<screen>git fetch origin
git merge v1.2.3^0
git merge --ff-only v1.2.3</screen>
</simplesect>
<simplesect id="git-merge(1)__how_conflicts_are_presented">
<title>HOW CONFLICTS ARE PRESENTED</title>
<simpara>During a merge, the working tree files are updated to reflect the result
of the merge.  Among the changes made to the common ancestor's version,
non-overlapping ones (that is, you changed an area of the file while the
other side left that area intact, or vice versa) are incorporated in the
final result verbatim.  When both sides made changes to the same area,
however, Git cannot randomly pick one side over the other, and asks you to
resolve it by leaving what both sides did to that area.</simpara>
<simpara>By default, Git uses the same style as the one used by the "merge" program
from the RCS suite to present such a conflicted hunk, like this:</simpara>
<screen>Here are lines that are either unchanged from the common
ancestor, or cleanly resolved because only one side changed,
or cleanly resolved because both sides changed the same way.
&lt;&lt;&lt;&lt;&lt;&lt;&lt; yours:sample.txt
Conflict resolution is hard;
let's go shopping.
=======
Git makes conflict resolution easy.
&gt;&gt;&gt;&gt;&gt;&gt;&gt; theirs:sample.txt
And here is another line that is cleanly resolved or unmodified.</screen>
<simpara>The area where a pair of conflicting changes happened is marked with markers
<emphasis>&lt;&lt;&lt;&lt;&lt;&lt;&lt;</emphasis>, <emphasis>=======</emphasis>, and <emphasis>&gt;&gt;&gt;&gt;&gt;&gt;&gt;</emphasis>.  The part before the <emphasis>=======</emphasis>
is typically your side, and the part afterwards is typically their side.</simpara>
<simpara>The default format does not show what the original said in the conflicting
area.  You cannot tell how many lines are deleted and replaced with
Barbie's remark on your side.  The only thing you can tell is that your
side wants to say it is hard and you'd prefer to go shopping, while the
other side wants to claim it is easy.</simpara>
<simpara>An alternative style can be used by setting the <emphasis>merge.conflictStyle</emphasis>
configuration variable to either "diff3" or "zdiff3".  In "diff3"
style, the above conflict may look like this:</simpara>
<screen>Here are lines that are either unchanged from the common
ancestor, or cleanly resolved because only one side changed,
&lt;&lt;&lt;&lt;&lt;&lt;&lt; yours:sample.txt
or cleanly resolved because both sides changed the same way.
Conflict resolution is hard;
let's go shopping.
||||||| base:sample.txt
or cleanly resolved because both sides changed identically.
Conflict resolution is hard.
=======
or cleanly resolved because both sides changed the same way.
Git makes conflict resolution easy.
&gt;&gt;&gt;&gt;&gt;&gt;&gt; theirs:sample.txt
And here is another line that is cleanly resolved or unmodified.</screen>
<simpara>while in "zdiff3" style, it may look like this:</simpara>
<screen>Here are lines that are either unchanged from the common
ancestor, or cleanly resolved because only one side changed,
or cleanly resolved because both sides changed the same way.
&lt;&lt;&lt;&lt;&lt;&lt;&lt; yours:sample.txt
Conflict resolution is hard;
let's go shopping.
||||||| base:sample.txt
or cleanly resolved because both sides changed identically.
Conflict resolution is hard.
=======
Git makes conflict resolution easy.
&gt;&gt;&gt;&gt;&gt;&gt;&gt; theirs:sample.txt
And here is another line that is cleanly resolved or unmodified.</screen>
<simpara>In addition to the <emphasis>&lt;&lt;&lt;&lt;&lt;&lt;&lt;</emphasis>, <emphasis>=======</emphasis>, and <emphasis>&gt;&gt;&gt;&gt;&gt;&gt;&gt;</emphasis> markers, it uses
another <emphasis>|||||||</emphasis> marker that is followed by the original text.  You can
tell that the original just stated a fact, and your side simply gave in to
that statement and gave up, while the other side tried to have a more
positive attitude.  You can sometimes come up with a better resolution by
viewing the original.</simpara>
</simplesect>
<simplesect id="git-merge(1)__how_to_resolve_conflicts">
<title>HOW TO RESOLVE CONFLICTS</title>
<simpara>After seeing a conflict, you can do two things:</simpara>
<itemizedlist>
<listitem>
<simpara>
Decide not to merge.  The only clean-ups you need are to reset
   the index file to the <emphasis>HEAD</emphasis> commit to reverse 2. and to clean
   up working tree changes made by 2. and 3.; <emphasis>git merge --abort</emphasis>
   can be used for this.
</simpara>
</listitem>
<listitem>
<simpara>
Resolve the conflicts.  Git will mark the conflicts in
   the working tree.  Edit the files into shape and
   <emphasis>git add</emphasis> them to the index.  Use <emphasis>git commit</emphasis> or
   <emphasis>git merge --continue</emphasis> to seal the deal. The latter command
   checks whether there is a (interrupted) merge in progress
   before calling <emphasis>git commit</emphasis>.
</simpara>
</listitem>
</itemizedlist>
<simpara>You can work through the conflict with a number of tools:</simpara>
<itemizedlist>
<listitem>
<simpara>
Use a mergetool.  <emphasis>git mergetool</emphasis> to launch a graphical
   mergetool which will work through the merge with you.
</simpara>
</listitem>
<listitem>
<simpara>
Look at the diffs.  <emphasis>git diff</emphasis> will show a three-way diff,
   highlighting changes from both the <emphasis>HEAD</emphasis> and <emphasis>MERGE_HEAD</emphasis>
   versions. <emphasis>git diff AUTO_MERGE</emphasis> will show what changes you've
   made so far to resolve textual conflicts.
</simpara>
</listitem>
<listitem>
<simpara>
Look at the diffs from each branch. <emphasis>git log --merge -p &lt;path&gt;</emphasis>
   will show diffs first for the <emphasis>HEAD</emphasis> version and then the
   <emphasis>MERGE_HEAD</emphasis> version.
</simpara>
</listitem>
<listitem>
<simpara>
Look at the originals.  <emphasis>git show :1:filename</emphasis> shows the
   common ancestor, <emphasis>git show :2:filename</emphasis> shows the <emphasis>HEAD</emphasis>
   version, and <emphasis>git show :3:filename</emphasis> shows the <emphasis>MERGE_HEAD</emphasis>
   version.
</simpara>
</listitem>
</itemizedlist>
</simplesect>
<simplesect id="git-merge(1)__examples">
<title>EXAMPLES</title>
<itemizedlist>
<listitem>
<simpara>
Merge branches <emphasis>fixes</emphasis> and <emphasis>enhancements</emphasis> on top of
  the current branch, making an octopus merge:
</simpara>
<screen>$ git merge fixes enhancements</screen>
</listitem>
<listitem>
<simpara>
Merge branch <emphasis>obsolete</emphasis> into the current branch, using <emphasis>ours</emphasis>
  merge strategy:
</simpara>
<screen>$ git merge -s ours obsolete</screen>
</listitem>
<listitem>
<simpara>
Merge branch <emphasis>maint</emphasis> into the current branch, but do not make
  a new commit automatically:
</simpara>
<screen>$ git merge --no-commit maint</screen>
<simpara>This can be used when you want to include further changes to the
merge, or want to write your own merge commit message.</simpara>
<simpara>You should refrain from abusing this option to sneak substantial
changes into a merge commit.  Small fixups like bumping
release/version name would be acceptable.</simpara>
</listitem>
</itemizedlist>
</simplesect>
<simplesect id="git-merge(1)__merge_strategies">
<title>MERGE STRATEGIES</title>
<simpara>The merge mechanism (<emphasis>git merge</emphasis> and <emphasis>git pull</emphasis> commands) allows the
backend <emphasis>merge strategies</emphasis> to be chosen with <emphasis>-s</emphasis> option.  Some strategies
can also take their own options, which can be passed by giving <emphasis>-X&lt;option&gt;</emphasis>
arguments to <emphasis>git merge</emphasis> and/or <emphasis>git pull</emphasis>.</simpara>
<variablelist>
<varlistentry>
<term>
ort
</term>
<listitem>
<simpara>
        This is the default merge strategy when pulling or merging one
        branch.  This strategy can only resolve two heads using a
        3-way merge algorithm.  When there is more than one common
        ancestor that can be used for 3-way merge, it creates a merged
        tree of the common ancestors and uses that as the reference
        tree for the 3-way merge.  This has been reported to result in
        fewer merge conflicts without causing mismerges by tests done
        on actual merge commits taken from Linux 2.6 kernel
        development history.  Additionally this strategy can detect
        and handle merges involving renames.  It does not make use of
        detected copies.  The name for this algorithm is an acronym
        ("Ostensibly Recursive's Twin") and came from the fact that it
        was written as a replacement for the previous default
        algorithm, <emphasis>recursive</emphasis>.
</simpara>
<simpara>The <emphasis>ort</emphasis> strategy can take the following options:</simpara>
<variablelist>
<varlistentry>
<term>
ours
</term>
<listitem>
<simpara>
        This option forces conflicting hunks to be auto-resolved cleanly by
        favoring <emphasis>our</emphasis> version.  Changes from the other tree that do not
        conflict with our side are reflected in the merge result.
        For a binary file, the entire contents are taken from our side.
</simpara>
<simpara>This should not be confused with the <emphasis>ours</emphasis> merge strategy, which does not
even look at what the other tree contains at all.  It discards everything
the other tree did, declaring <emphasis>our</emphasis> history contains all that happened in it.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
theirs
</term>
<listitem>
<simpara>
        This is the opposite of <emphasis>ours</emphasis>; note that, unlike <emphasis>ours</emphasis>, there is
        no <emphasis>theirs</emphasis> merge strategy to confuse this merge option with.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
ignore-space-change
</term>
<term>
ignore-all-space
</term>
<term>
ignore-space-at-eol
</term>
<term>
ignore-cr-at-eol
</term>
<listitem>
<simpara>
        Treats lines with the indicated type of whitespace change as
        unchanged for the sake of a three-way merge.  Whitespace
        changes mixed with other changes to a line are not ignored.
        See also <xref linkend="git-diff(1)" /> <emphasis>-b</emphasis>, <emphasis>-w</emphasis>,
        <emphasis>--ignore-space-at-eol</emphasis>, and <emphasis>--ignore-cr-at-eol</emphasis>.
</simpara>
<itemizedlist>
<listitem>
<simpara>
If <emphasis>their</emphasis> version only introduces whitespace changes to a line,
  <emphasis>our</emphasis> version is used;
</simpara>
</listitem>
<listitem>
<simpara>
If <emphasis>our</emphasis> version introduces whitespace changes but <emphasis>their</emphasis>
  version includes a substantial change, <emphasis>their</emphasis> version is used;
</simpara>
</listitem>
<listitem>
<simpara>
Otherwise, the merge proceeds in the usual way.
</simpara>
</listitem>
</itemizedlist>
</listitem>
</varlistentry>
<varlistentry>
<term>
renormalize
</term>
<listitem>
<simpara>
        This runs a virtual check-out and check-in of all three stages
        of a file when resolving a three-way merge.  This option is
        meant to be used when merging branches with different clean
        filters or end-of-line normalization rules.  See "Merging
        branches with differing checkin/checkout attributes" in
        <xref linkend="gitattributes(5)" /> for details.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
no-renormalize
</term>
<listitem>
<simpara>
        Disables the <emphasis>renormalize</emphasis> option.  This overrides the
        <emphasis>merge.renormalize</emphasis> configuration variable.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
find-renames[=&lt;n&gt;]
</term>
<listitem>
<simpara>
        Turn on rename detection, optionally setting the similarity
        threshold.  This is the default. This overrides the
        <emphasis>merge.renames</emphasis> configuration variable.
        See also <xref linkend="git-diff(1)" /> <emphasis>--find-renames</emphasis>.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
rename-threshold=&lt;n&gt;
</term>
<listitem>
<simpara>
        Deprecated synonym for <emphasis>find-renames=&lt;n&gt;</emphasis>.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
subtree[=&lt;path&gt;]
</term>
<listitem>
<simpara>
        This option is a more advanced form of <emphasis>subtree</emphasis> strategy, where
        the strategy makes a guess on how two trees must be shifted to
        match with each other when merging.  Instead, the specified path
        is prefixed (or stripped from the beginning) to make the shape of
        two trees to match.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>
recursive
</term>
<listitem>
<simpara>
        This can only resolve two heads using a 3-way merge
        algorithm.  When there is more than one common
        ancestor that can be used for 3-way merge, it creates a
        merged tree of the common ancestors and uses that as
        the reference tree for the 3-way merge.  This has been
        reported to result in fewer merge conflicts without
        causing mismerges by tests done on actual merge commits
        taken from Linux 2.6 kernel development history.
        Additionally this can detect and handle merges involving
        renames.  It does not make use of detected copies.  This was
        the default strategy for resolving two heads from Git v0.99.9k
        until v2.33.0.
</simpara>
<simpara>The <emphasis>recursive</emphasis> strategy takes the same options as <emphasis>ort</emphasis>.  However,
there are three additional options that <emphasis>ort</emphasis> ignores (not documented
above) that are potentially useful with the <emphasis>recursive</emphasis> strategy:</simpara>
<variablelist>
<varlistentry>
<term>
patience
</term>
<listitem>
<simpara>
        Deprecated synonym for <emphasis>diff-algorithm=patience</emphasis>.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
diff-algorithm=[patience|minimal|histogram|myers]
</term>
<listitem>
<simpara>
        Use a different diff algorithm while merging, which can help
        avoid mismerges that occur due to unimportant matching lines
        (such as braces from distinct functions).  See also
        <xref linkend="git-diff(1)" /> <emphasis>--diff-algorithm</emphasis>.  Note that <emphasis>ort</emphasis>
        specifically uses <emphasis>diff-algorithm=histogram</emphasis>, while <emphasis>recursive</emphasis>
        defaults to the <emphasis>diff.algorithm</emphasis> config setting.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
no-renames
</term>
<listitem>
<simpara>
        Turn off rename detection. This overrides the <emphasis>merge.renames</emphasis>
        configuration variable.
        See also <xref linkend="git-diff(1)" /> <emphasis>--no-renames</emphasis>.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>
resolve
</term>
<listitem>
<simpara>
        This can only resolve two heads (i.e. the current branch
        and another branch you pulled from) using a 3-way merge
        algorithm.  It tries to carefully detect criss-cross
        merge ambiguities.  It does not handle renames.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
octopus
</term>
<listitem>
<simpara>
        This resolves cases with more than two heads, but refuses to do
        a complex merge that needs manual resolution.  It is
        primarily meant to be used for bundling topic branch
        heads together.  This is the default merge strategy when
        pulling or merging more than one branch.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
ours
</term>
<listitem>
<simpara>
        This resolves any number of heads, but the resulting tree of the
        merge is always that of the current branch head, effectively
        ignoring all changes from all other branches.  It is meant to
        be used to supersede old development history of side
        branches.  Note that this is different from the -Xours option to
        the <emphasis>recursive</emphasis> merge strategy.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
subtree
</term>
<listitem>
<simpara>
        This is a modified <emphasis>ort</emphasis> strategy. When merging trees A and
        B, if B corresponds to a subtree of A, B is first adjusted to
        match the tree structure of A, instead of reading the trees at
        the same level. This adjustment is also done to the common
        ancestor tree.
</simpara>
</listitem>
</varlistentry>
</variablelist>
<simpara>With the strategies that use 3-way merge (including the default, <emphasis>ort</emphasis>),
if a change is made on both branches, but later reverted on one of the
branches, that change will be present in the merged result; some people find
this behavior confusing.  It occurs because only the heads and the merge base
are considered when performing a merge, not the individual commits.  The merge
algorithm therefore considers the reverted change as no change at all, and
substitutes the changed version instead.</simpara>
</simplesect>
<simplesect id="git-merge(1)__configuration">
<title>CONFIGURATION</title>
<variablelist>
<varlistentry>
<term>
branch.&lt;name&gt;.mergeOptions
</term>
<listitem>
<simpara>
        Sets default options for merging into branch &lt;name&gt;. The syntax and
        supported options are the same as those of <emphasis>git merge</emphasis>, but option
        values containing whitespace characters are currently not supported.
</simpara>
</listitem>
</varlistentry>
</variablelist>
<simpara>Everything above this line in this section isn't included from the
<xref linkend="git-config(1)" /> documentation. The content that follows is the
same as what's found there:</simpara>
<variablelist>
<varlistentry>
<term>
merge.conflictStyle
</term>
<listitem>
<simpara>
        Specify the style in which conflicted hunks are written out to
        working tree files upon merge.  The default is "merge", which
        shows a <emphasis>&lt;&lt;&lt;&lt;&lt;&lt;&lt;</emphasis> conflict marker, changes made by one side,
        a <emphasis>=======</emphasis> marker, changes made by the other side, and then
        a <emphasis>&gt;&gt;&gt;&gt;&gt;&gt;&gt;</emphasis> marker.  An alternate style, "diff3", adds a <emphasis>|||||||</emphasis>
        marker and the original text before the <emphasis>=======</emphasis> marker.  The
        "merge" style tends to produce smaller conflict regions than diff3,
        both because of the exclusion of the original text, and because
        when a subset of lines match on the two sides, they are just pulled
        out of the conflict region.  Another alternate style, "zdiff3", is
        similar to diff3 but removes matching lines on the two sides from
        the conflict region when those matching lines appear near either
        the beginning or end of a conflict region.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
merge.defaultToUpstream
</term>
<listitem>
<simpara>
        If merge is called without any commit argument, merge the upstream
        branches configured for the current branch by using their last
        observed values stored in their remote-tracking branches.
        The values of the <emphasis>branch.&lt;current branch&gt;.merge</emphasis> that name the
        branches at the remote named by <emphasis>branch.&lt;current branch&gt;.remote</emphasis>
        are consulted, and then they are mapped via <emphasis>remote.&lt;remote&gt;.fetch</emphasis>
        to their corresponding remote-tracking branches, and the tips of
        these tracking branches are merged. Defaults to true.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
merge.ff
</term>
<listitem>
<simpara>
        By default, Git does not create an extra merge commit when merging
        a commit that is a descendant of the current commit. Instead, the
        tip of the current branch is fast-forwarded. When set to <emphasis>false</emphasis>,
        this variable tells Git to create an extra merge commit in such
        a case (equivalent to giving the <emphasis>--no-ff</emphasis> option from the command
        line). When set to <emphasis>only</emphasis>, only such fast-forward merges are
        allowed (equivalent to giving the <emphasis>--ff-only</emphasis> option from the
        command line).
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
merge.verifySignatures
</term>
<listitem>
<simpara>
        If true, this is equivalent to the --verify-signatures command
        line option. See <xref linkend="git-merge(1)" /> for details.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
merge.branchdesc
</term>
<listitem>
<simpara>
        In addition to branch names, populate the log message with
        the branch description text associated with them.  Defaults
        to false.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
merge.log
</term>
<listitem>
<simpara>
        In addition to branch names, populate the log message with at
        most the specified number of one-line descriptions from the
        actual commits that are being merged.  Defaults to false, and
        true is a synonym for 20.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
merge.suppressDest
</term>
<listitem>
<simpara>
        By adding a glob that matches the names of integration
        branches to this multi-valued configuration variable, the
        default merge message computed for merges into these
        integration branches will omit "into &lt;branch name&gt;" from
        its title.
</simpara>
<simpara>An element with an empty value can be used to clear the list
of globs accumulated from previous configuration entries.
When there is no <emphasis>merge.suppressDest</emphasis> variable defined, the
default value of <emphasis>master</emphasis> is used for backward compatibility.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
merge.renameLimit
</term>
<listitem>
<simpara>
        The number of files to consider in the exhaustive portion of
        rename detection during a merge.  If not specified, defaults
        to the value of diff.renameLimit.  If neither
        merge.renameLimit nor diff.renameLimit are specified,
        currently defaults to 7000.  This setting has no effect if
        rename detection is turned off.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
merge.renames
</term>
<listitem>
<simpara>
        Whether Git detects renames.  If set to "false", rename detection
        is disabled. If set to "true", basic rename detection is enabled.
        Defaults to the value of diff.renames.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
merge.directoryRenames
</term>
<listitem>
<simpara>
        Whether Git detects directory renames, affecting what happens at
        merge time to new files added to a directory on one side of
        history when that directory was renamed on the other side of
        history.  If merge.directoryRenames is set to "false", directory
        rename detection is disabled, meaning that such new files will be
        left behind in the old directory.  If set to "true", directory
        rename detection is enabled, meaning that such new files will be
        moved into the new directory.  If set to "conflict", a conflict
        will be reported for such paths.  If merge.renames is false,
        merge.directoryRenames is ignored and treated as false.  Defaults
        to "conflict".
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
merge.renormalize
</term>
<listitem>
<simpara>
        Tell Git that canonical representation of files in the
        repository has changed over time (e.g. earlier commits record
        text files with CRLF line endings, but recent ones use LF line
        endings).  In such a repository, Git can convert the data
        recorded in commits to a canonical form before performing a
        merge to reduce unnecessary conflicts.  For more information,
        see section "Merging branches with differing checkin/checkout
        attributes" in <xref linkend="gitattributes(5)" />.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
merge.stat
</term>
<listitem>
<simpara>
        Whether to print the diffstat between ORIG_HEAD and the merge result
        at the end of the merge.  True by default.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
merge.autoStash
</term>
<listitem>
<simpara>
        When set to true, automatically create a temporary stash entry
        before the operation begins, and apply it after the operation
        ends.  This means that you can run merge on a dirty worktree.
        However, use with care: the final stash application after a
        successful merge might result in non-trivial conflicts.
        This option can be overridden by the <emphasis>--no-autostash</emphasis> and
        <emphasis>--autostash</emphasis> options of <xref linkend="git-merge(1)" />.
        Defaults to false.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
merge.tool
</term>
<listitem>
<simpara>
        Controls which merge tool is used by <xref linkend="git-mergetool(1)" />.
        The list below shows the valid built-in values.
        Any other value is treated as a custom merge tool and requires
        that a corresponding mergetool.&lt;tool&gt;.cmd variable is defined.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
merge.guitool
</term>
<listitem>
<simpara>
        Controls which merge tool is used by <xref linkend="git-mergetool(1)" /> when the
        -g/--gui flag is specified. The list below shows the valid built-in values.
        Any other value is treated as a custom merge tool and requires that a
        corresponding mergetool.&lt;guitool&gt;.cmd variable is defined.
</simpara>
<variablelist>
<varlistentry>
<term>
<emphasis>araxis</emphasis>
</term>
<listitem>
<simpara>
Use Araxis Merge (requires a graphical session)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>bc</emphasis>
</term>
<listitem>
<simpara>
Use Beyond Compare (requires a graphical session)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>bc3</emphasis>
</term>
<listitem>
<simpara>
Use Beyond Compare (requires a graphical session)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>bc4</emphasis>
</term>
<listitem>
<simpara>
Use Beyond Compare (requires a graphical session)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>codecompare</emphasis>
</term>
<listitem>
<simpara>
Use Code Compare (requires a graphical session)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>deltawalker</emphasis>
</term>
<listitem>
<simpara>
Use DeltaWalker (requires a graphical session)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>diffmerge</emphasis>
</term>
<listitem>
<simpara>
Use DiffMerge (requires a graphical session)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>diffuse</emphasis>
</term>
<listitem>
<simpara>
Use Diffuse (requires a graphical session)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>ecmerge</emphasis>
</term>
<listitem>
<simpara>
Use ECMerge (requires a graphical session)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>emerge</emphasis>
</term>
<listitem>
<simpara>
Use Emacs' Emerge
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>examdiff</emphasis>
</term>
<listitem>
<simpara>
Use ExamDiff Pro (requires a graphical session)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>guiffy</emphasis>
</term>
<listitem>
<simpara>
Use Guiffy's Diff Tool (requires a graphical session)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>gvimdiff</emphasis>
</term>
<listitem>
<simpara>
Use gVim (requires a graphical session) with a custom layout (see <emphasis>git help mergetool</emphasis>'s <emphasis>BACKEND SPECIFIC HINTS</emphasis> section)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>gvimdiff1</emphasis>
</term>
<listitem>
<simpara>
Use gVim (requires a graphical session) with a 2 panes layout (LOCAL and REMOTE)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>gvimdiff2</emphasis>
</term>
<listitem>
<simpara>
Use gVim (requires a graphical session) with a 3 panes layout (LOCAL, MERGED and REMOTE)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>gvimdiff3</emphasis>
</term>
<listitem>
<simpara>
Use gVim (requires a graphical session) where only the MERGED file is shown
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>kdiff3</emphasis>
</term>
<listitem>
<simpara>
Use KDiff3 (requires a graphical session)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>meld</emphasis>
</term>
<listitem>
<simpara>
Use Meld (requires a graphical session) with optional <emphasis>auto merge</emphasis> (see <emphasis>git help mergetool</emphasis>'s <emphasis>CONFIGURATION</emphasis> section)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>nvimdiff</emphasis>
</term>
<listitem>
<simpara>
Use Neovim with a custom layout (see <emphasis>git help mergetool</emphasis>'s <emphasis>BACKEND SPECIFIC HINTS</emphasis> section)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>nvimdiff1</emphasis>
</term>
<listitem>
<simpara>
Use Neovim with a 2 panes layout (LOCAL and REMOTE)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>nvimdiff2</emphasis>
</term>
<listitem>
<simpara>
Use Neovim with a 3 panes layout (LOCAL, MERGED and REMOTE)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>nvimdiff3</emphasis>
</term>
<listitem>
<simpara>
Use Neovim where only the MERGED file is shown
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>opendiff</emphasis>
</term>
<listitem>
<simpara>
Use FileMerge (requires a graphical session)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>p4merge</emphasis>
</term>
<listitem>
<simpara>
Use HelixCore P4Merge (requires a graphical session)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>smerge</emphasis>
</term>
<listitem>
<simpara>
Use Sublime Merge (requires a graphical session)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>tkdiff</emphasis>
</term>
<listitem>
<simpara>
Use TkDiff (requires a graphical session)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>tortoisemerge</emphasis>
</term>
<listitem>
<simpara>
Use TortoiseMerge (requires a graphical session)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>vimdiff</emphasis>
</term>
<listitem>
<simpara>
Use Vim with a custom layout (see <emphasis>git help mergetool</emphasis>'s <emphasis>BACKEND SPECIFIC HINTS</emphasis> section)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>vimdiff1</emphasis>
</term>
<listitem>
<simpara>
Use Vim with a 2 panes layout (LOCAL and REMOTE)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>vimdiff2</emphasis>
</term>
<listitem>
<simpara>
Use Vim with a 3 panes layout (LOCAL, MERGED and REMOTE)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>vimdiff3</emphasis>
</term>
<listitem>
<simpara>
Use Vim where only the MERGED file is shown
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>winmerge</emphasis>
</term>
<listitem>
<simpara>
Use WinMerge (requires a graphical session)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>xxdiff</emphasis>
</term>
<listitem>
<simpara>
Use xxdiff (requires a graphical session)
</simpara>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>
merge.verbosity
</term>
<listitem>
<simpara>
        Controls the amount of output shown by the recursive merge
        strategy.  Level 0 outputs nothing except a final error
        message if conflicts were detected. Level 1 outputs only
        conflicts, 2 outputs conflicts and file changes.  Level 5 and
        above outputs debugging information.  The default is level 2.
        Can be overridden by the <emphasis>GIT_MERGE_VERBOSITY</emphasis> environment variable.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
merge.&lt;driver&gt;.name
</term>
<listitem>
<simpara>
        Defines a human-readable name for a custom low-level
        merge driver.  See <xref linkend="gitattributes(5)" /> for details.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
merge.&lt;driver&gt;.driver
</term>
<listitem>
<simpara>
        Defines the command that implements a custom low-level
        merge driver.  See <xref linkend="gitattributes(5)" /> for details.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
merge.&lt;driver&gt;.recursive
</term>
<listitem>
<simpara>
        Names a low-level merge driver to be used when
        performing an internal merge between common ancestors.
        See <xref linkend="gitattributes(5)" /> for details.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</simplesect>
<simplesect id="git-merge(1)__see_also">
<title>SEE ALSO</title>
<simpara><xref linkend="git-fmt-merge-msg(1)" />, <xref linkend="git-pull(1)" />,
<xref linkend="gitattributes(5)" />,
<xref linkend="git-reset(1)" />,
<xref linkend="git-diff(1)" />, <xref linkend="git-ls-files(1)" />,
<xref linkend="git-add(1)" />, <xref linkend="git-rm(1)" />,
<xref linkend="git-mergetool(1)" /></simpara>
</simplesect>
<simplesect id="git-merge(1)__git">
<title>GIT</title>
<simpara>Part of the <xref linkend="git(1)" /> suite</simpara>
</simplesect>
</sect2>
