← 返回命令列表

Linux command

git-write-tree 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Write tree from index

git write-tree

Write with prefix

git write-tree --prefix=[subdir/]

Missing OK

git write-tree --missing-ok

说明

git write-tree creates a tree object from the current index contents. 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.

参数

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

FAQ

What is the git-write-tree command used for?

git write-tree creates a tree object from the current index contents. 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.

How do I run a basic git-write-tree example?

Run `git write-tree` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --prefix _prefix_ do in git-write-tree?

Write subtree.