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