]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-write-tree.txt
Documentation: move command list in git.txt into separate files.
[thirdparty/git.git] / Documentation / git-write-tree.txt
CommitLineData
2cf565c5
DG
1git-write-tree(1)
2=================
2cf565c5
DG
3
4NAME
5----
5f3aa197 6git-write-tree - Creates a tree object from the current index
2cf565c5
DG
7
8
9SYNOPSIS
10--------
6bd20358 11'git-write-tree' [--missing-ok] [--prefix=<prefix>/]
2cf565c5
DG
12
13DESCRIPTION
14-----------
5f3aa197 15Creates a tree object using the current index.
2cf565c5 16
61f693bd 17The index must be in a fully merged state.
2cf565c5 18
61f693bd 19Conceptually, `git-write-tree` sync()s the current index contents
2cf565c5
DG
20into a set of tree files.
21In order to have that match what is actually in your directory right
61f693bd
JL
22now, you need to have done a `git-update-index` phase before you did the
23`git-write-tree`.
24
2cf565c5 25
9c1fa70a
BL
26OPTIONS
27-------
28--missing-ok::
61f693bd
JL
29 Normally `git-write-tree` ensures that the objects referenced by the
30 directory exist in the object database. This option disables this
31 check.
2cf565c5 32
6bd20358
JH
33--prefix=<prefix>/::
34 Writes a tree object that represents a subdirectory
35 `<prefix>`. This can be used to write the tree object
36 for a subproject that is in the named subdirectory.
37
38
2cf565c5
DG
39Author
40------
41Written by Linus Torvalds <torvalds@osdl.org>
42
43Documentation
44--------------
45Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
46
47GIT
48---
a7154e91 49Part of the gitlink:git[7] suite
2cf565c5 50