# man > git-merge-tree(1)

> **TLDR:** 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}}`

*Source: tldr-pages*

---

[GIT-MERGE-TREE(1)](https://www.chedong.com/phpMan.php/man/GIT-MERGE-TREE/1/markdown)                            Git Manual                            [GIT-MERGE-TREE(1)](https://www.chedong.com/phpMan.php/man/GIT-MERGE-TREE/1/markdown)



## 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)](https://www.chedong.com/phpMan.php/man/git/1/markdown) suite



Git 2.34.1                                   02/26/2026                            [GIT-MERGE-TREE(1)](https://www.chedong.com/phpMan.php/man/GIT-MERGE-TREE/1/markdown)
