git-read-tree
TLDR
Read tree into index
$ git read-tree [tree-ish]
Merge trees$ git read-tree -m [base] [ours] [theirs]
Read with prefix$ git read-tree --prefix=[dir/] [tree-ish]
Reset index$ git read-tree --reset HEAD
SYNOPSIS
git read-tree [options] tree-ish
DESCRIPTION
git read-tree reads tree information into the index. It's a plumbing command used by porcelain commands like checkout and merge to manipulate the index.
The command can read single trees or perform three-way merges of trees. It updates the index without touching the working tree unless -u is specified.
git read-tree provides low-level index manipulation.
PARAMETERS
TREE-ISH
Tree to read.-m
Merge mode.-u
Update working tree.--reset
Same as -m, discard unmerged.--prefix DIR
Read into subdirectory.-i
Only update index.--help
Display help information.
CAVEATS
Plumbing command. Usually invoked by other commands. Can overwrite index state.
HISTORY
git read-tree is a core Git plumbing command implementing index manipulation, used internally by checkout, merge, and other commands.
SEE ALSO
git-write-tree(1), git-ls-tree(1), git-checkout(1)


