# git-write-tree
> 原文: [https://git-scm.com/docs/git-write-tree](https://git-scm.com/docs/git-write-tree)
## 名稱
git-write-tree - 從當前索引創建樹對象
## 概要
```
git write-tree [--missing-ok] [--prefix=<prefix>/]
```
## 描述
使用當前索引創建樹對象。新樹對象的名稱將打印到標準輸出。
索引必須處于完全合并狀態。
從概念上講, _git write-tree_ sync()將當前索引內容轉換為一組樹文件。為了使你的目錄中實際存在的匹配,你需要在 _git write-tree_ 之前完成 _git update-index_ 階段。
## OPTIONS
```
--missing-ok
```
通常 _git write-tree_ 確保目錄引用的對象存在于對象數據庫中。此選項禁用此檢查。
```
--prefix=<prefix>/
```
寫一個表示子目錄`<prefix>`的樹對象。這可用于為命名子目錄中的子項目編寫樹對象。
## GIT
部分 [git [1]](https://git-scm.com/docs/git) 套件
- git
- git-config
- git-help
- git-init
- git-clone
- git-add
- git-status
- git-diff
- git-commit
- git-reset
- git-rm
- git-mv
- git-branch
- git-checkout
- git-merge
- git-mergetool
- git-log
- git-stash
- git-tag
- git-worktree
- git-fetch
- git-pull
- git-push
- git-remote
- git-submodule
- git-show
- git-log
- git-shortlog
- git-describe
- git-apply
- git-cherry-pick
- git-rebase
- git-revert
- git-bisect
- git-blame
- git-grep
- gitattributes
- giteveryday
- gitglossary
- githooks
- gitignore
- gitmodules
- gitrevisions
- gittutorial
- gitworkflows
- git-am
- git-format-patch
- git-send-email
- git-request-pull
- git-svn
- git-fast-import
- git-clean
- git-gc
- git-fsck
- git-reflog
- git-filter-branch
- git-instaweb
- git-archive
- git-bundle
- git-daemon
- git-update-server-info
- git-cat-file
- git-check-ignore
- git-checkout-index
- git-commit-tree
- git-count-objects
- git-diff-index
- git-for-each-ref
- git-hash-object
- git-ls-files
- git-merge-base
- git-read-tree
- git-rev-list
- git-rev-parse
- git-show-ref
- git-symbolic-ref
- git-update-index
- git-update-ref
- git-verify-pack
- git-write-tree