commands.sh

git mktree

all

Build a tree object using `ls-tree` formatted text.

More info →

Examples (5)

Build a tree object and verify that each tree entry's hash identifies an existing object

Allow missing objects

git mktree --missing

Read the NUL ([z]ero character) terminated output of the tree object (`git ls-tree -z`)

Allow the creation of multiple tree objects

git mktree --batch

Sort and build a tree from `stdin` (non-recursive `git ls-tree` output format is required)

git < path/to/tree.txt mktree
made by @shridhargupta | data from tldr-pages