LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

git-write-tree

Create a tree object from the current index

TLDR

Write tree from index
$ git write-tree
copy
Write with prefix
$ git write-tree --prefix=[subdir/]
copy
Missing OK
$ git write-tree --missing-ok
copy

SYNOPSIS

git write-tree [options]

DESCRIPTION

git write-tree creates a tree object from the current index contents and prints the resulting tree object's SHA to standard output. It is a low-level plumbing command used internally by `git commit` to snapshot the staged file structure into a tree object in the Git object database.The index must be in a fully merged state before running this command; typically `git update-index` is used first to sync the index with the working directory.

PARAMETERS

--prefix prefix

Write subtree.
--missing-ok
Allow missing objects.

INSTALL

sudo apt install git
copy
sudo dnf install git
copy
sudo pacman -S git
copy
sudo apk add git
copy
sudo zypper install git
copy
brew install git
copy
nix profile install nixpkgs#git
copy

SEE ALSO

RESOURCES

Copied to clipboard
Kai