phpMan > man > git-merge-tree(1)

Markdown | JSON | MCP    

TLDR: git-merge-tree (tldr-pages)

Merge branches without changing files.

  • Show the result of a merge between two branches
    git merge-tree {{branch1}} {{branch2}}
  • Perform a merge and write the resulting tree
    git merge-tree --write-tree {{branch1}} {{branch2}}
GIT-MERGE-TREE(1)                            Git Manual                            GIT-MERGE-TREE(1)



NAME
       git-merge-tree - Show three-way merge without touching index

SYNOPSIS
       git merge-tree <base-tree> <branch1> <branch2>


DESCRIPTION
       Reads three tree-ish, and output trivial merge results and conflicting stages to the standard
       output. This is similar to what three-way git read-tree -m does, but instead of storing the
       results in the index, the command outputs the entries to the standard output.

       This is meant to be used by higher level scripts to compute merge results outside of the
       index, and stuff the results back into the index. For this reason, the output from the
       command omits entries that match the <branch1> tree.

GIT
       Part of the git(1) suite



Git 2.34.1                                   02/26/2026                            GIT-MERGE-TREE(1)

Generated by phpMan v3.7.6 Author: Che Dong Under GNU General Public License
2026-06-09 16:28 @2600:1f28:365:80b0:c49e:5481:119:ea02
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Valid XHTML 1.0 TransitionalValid CSS!