blob: f22041a9dc3965b4a4f704e84ec7700a5993d5c6 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-write-tree(1)
2=================
3
4NAME
5----
Junio C Hamano7c73c662007-01-19 00:37:506git-write-tree - Create a tree object from the current index
Junio C Hamano1a4e8412005-12-27 08:17:237
8
9SYNOPSIS
10--------
Junio C Hamano15567bc2011-07-23 00:51:5911[verse]
Junio C Hamanofce7c7e2008-07-02 03:06:3812'git write-tree' [--missing-ok] [--prefix=<prefix>/]
Junio C Hamano1a4e8412005-12-27 08:17:2313
14DESCRIPTION
15-----------
Junio C Hamano92c64d52009-08-26 23:42:5516Creates a tree object using the current index. The name of the new
17tree object is printed to standard output.
Junio C Hamano1a4e8412005-12-27 08:17:2318
19The index must be in a fully merged state.
20
Junio C Hamano1aa40d22010-01-21 17:46:4321Conceptually, 'git write-tree' sync()s the current index contents
Junio C Hamano1a4e8412005-12-27 08:17:2322into a set of tree files.
23In order to have that match what is actually in your directory right
Junio C Hamano1aa40d22010-01-21 17:46:4324now, you need to have done a 'git update-index' phase before you did the
25'git write-tree'.
Junio C Hamano1a4e8412005-12-27 08:17:2326
27
28OPTIONS
29-------
30--missing-ok::
Junio C Hamano1aa40d22010-01-21 17:46:4331Normally 'git write-tree' ensures that the objects referenced by the
Junio C Hamano1a4e8412005-12-27 08:17:2332directory exist in the object database. This option disables this
33check.
34
Junio C Hamanoad8c6432006-06-18 09:26:4335--prefix=<prefix>/::
36Writes a tree object that represents a subdirectory
37`<prefix>`. This can be used to write the tree object
38for a subproject that is in the named subdirectory.
39
Junio C Hamano1a4e8412005-12-27 08:17:2340GIT
41---
Junio C Hamanof7c042d2008-06-06 22:50:5342Part of the linkgit:git[1] suite