Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/Documentation/git-merge-tree.adoc # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / Documentation / git-merge-tree.adoc` 348 lines ยท 12934 bytes Raw Blame History 1 git-merge-tree(1) 2 ================= 3 4 NAME 5 ---- 6 git-merge-tree - Perform merge without touching index or working tree 7 8 9 SYNOPSIS 10 -------- 11 [verse] 12 'git merge-tree' [--write-tree] [] 13 'git merge-tree' [--trivial-merge] (deprecated) 14 15 [[NEWMERGE]] 16 DESCRIPTION 17 ----------- 18 19 This command has a modern `--write-tree` mode and a deprecated 20 `--trivial-merge` mode. With the exception of the 21 <> section at the end, the rest of 22 this documentation describes the modern `--write-tree` mode. 23 24 Performs a merge, but does not make any new commits and does not read 25 from or write to either the working tree or index. 26 27 The performed merge will use the same features as the "real" 28 linkgit:git-merge[1], including: 29 30 * three way content merges of individual files 31 * rename detection 32 * proper directory/file conflict handling 33 * recursive ancestor consolidation (i.e. when there is more than one 34 merge base, creating a virtual merge base by merging the merge bases) 35 * etc. 36 37 After the merge completes, a new toplevel tree object is created. See 38 <> below for details. 39 40 OPTIONS 41 ------- 42 43 --stdin:: 44 Read the commits to merge from the standard input rather than 45 the command-line. See <> below for more 46 information. Implies `-z`. 47 48 -z:: 49 Do not quote filenames in the section, 50 and end each filename with a NUL character rather than 51 newline. Also begin the messages section with a NUL character 52 instead of a newline. See <> below for more 53 information. 54 55 --name-only:: 56 In the Conflicted file info section, instead of writing a list 57 of (mode, oid, stage, path) tuples to output for conflicted 58 files, just provide a list of filenames with conflicts (and 59 do not list filenames multiple times if they have multiple 60 conflicting stages). 61 62 --messages:: 63 --no-messages:: 64 Write any informational messages such as "Auto-merging " 65 or CONFLICT notices to the end of stdout. If unspecified, the 66 default is to include these messages if there are merge 67 conflicts, and to omit them otherwise. 68 69 --quiet:: 70 Disable all output from the program. Useful when you are only 71 interested in the exit status. Allows merge-tree to exit 72 early when it finds a conflict, and allows it to avoid writing 73 most objects created by merges. 74 75 --allow-unrelated-histories:: 76 merge-tree will by default error out if the two branches specified 77 share no common history. This flag can be given to override that 78 check and make the merge proceed anyway. 79 80 --merge-base=:: 81 Instead of finding the merge-bases for and , 82 specify a merge-base for the merge. This option is incompatible with 83 `--stdin`. 84 + 85 Specifying multiple bases is currently not supported, which means that when 86 merging two branches with more than one merge-base, using this option may 87 cause merge results to differ from what `git merge` would compute. This 88 can include potentially losing some changes made on one side of the history 89 in the resulting merge. 90 + 91 With this option, since the merge-base is provided directly, and 92 do not need to specify commits; trees are enough. 93 94 -X