'\" t .\" Title: git-merge-tree .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 01/10/2025 .\" Manual: Git Manual .\" Source: Git 2.48.0 .\" Language: English .\" .TH "GIT\-MERGE\-TREE" "1" "01/10/2025" "Git 2\&.48\&.0" "Git Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" git-merge-tree \- Perform merge without touching index or working tree .SH "SYNOPSIS" .sp .nf \fIgit merge\-tree\fR [\-\-write\-tree] [] \fIgit merge\-tree\fR [\-\-trivial\-merge] (deprecated) .fi .sp .SH "DESCRIPTION" .sp This command has a modern \fB\-\-write\-tree\fR mode and a deprecated \fB\-\-trivial\-merge\fR mode\&. With the exception of the DEPRECATED DESCRIPTION section at the end, the rest of this documentation describes the modern \fB\-\-write\-tree\fR mode\&. .sp Performs a merge, but does not make any new commits and does not read from or write to either the working tree or index\&. .sp The performed merge will use the same features as the "real" \fBgit-merge\fR(1), including: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} three way content merges of individual files .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} rename detection .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} proper directory/file conflict handling .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} recursive ancestor consolidation (i\&.e\&. when there is more than one merge base, creating a virtual merge base by merging the merge bases) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} etc\&. .RE .sp After the merge completes, a new toplevel tree object is created\&. See \fBOUTPUT\fR below for details\&. .SH "OPTIONS" .PP \-z .RS 4 Do not quote filenames in the section, and end each filename with a NUL character rather than newline\&. Also begin the messages section with a NUL character instead of a newline\&. See the section called \(lqOUTPUT\(rq below for more information\&. .RE .PP \-\-name\-only .RS 4 In the Conflicted file info section, instead of writing a list of (mode, oid, stage, path) tuples to output for conflicted files, just provide a list of filenames with conflicts (and do not list filenames multiple times if they have multiple conflicting stages)\&. .RE .PP \-\-[no\-]messages .RS 4 Write any informational messages such as "Auto\-merging " or CONFLICT notices to the end of stdout\&. If unspecified, the default is to include these messages if there are merge conflicts, and to omit them otherwise\&. .RE .PP \-\-allow\-unrelated\-histories .RS 4 merge\-tree will by default error out if the two branches specified share no common history\&. This flag can be given to override that check and make the merge proceed anyway\&. .RE .PP \-\-merge\-base= .RS 4 Instead of finding the merge\-bases for and , specify a merge\-base for the merge, and specifying multiple bases is currently not supported\&. This option is incompatible with \fB\-\-stdin\fR\&. .sp As the merge\-base is provided directly, and do not need to specify commits; trees are enough\&. .RE .PP \-X