blob: f22041a9dc3965b4a4f704e84ec7700a5993d5c6 [file] [log] [blame]
David Greaves2cf565c2005-05-10 22:32:30 +01001git-write-tree(1)
2=================
David Greaves2cf565c2005-05-10 22:32:30 +01003
4NAME
5----
Junio C Hamanoc3f0baa2007-01-18 15:53:37 -08006git-write-tree - Create a tree object from the current index
David Greaves2cf565c2005-05-10 22:32:30 +01007
8
9SYNOPSIS
10--------
Martin von Zweigbergk7791a1d2011-07-01 22:38:26 -040011[verse]
Jonathan Niederb1889c32008-06-30 01:09:04 -050012'git write-tree' [--missing-ok] [--prefix=<prefix>/]
David Greaves2cf565c2005-05-10 22:32:30 +010013
14DESCRIPTION
15-----------
David Kågedal8d951842009-08-26 16:04:54 +020016Creates a tree object using the current index. The name of the new
17tree object is printed to standard output.
David Greaves2cf565c2005-05-10 22:32:30 +010018
Jon Loeliger61f693b2005-12-05 23:13:03 -060019The index must be in a fully merged state.
David Greaves2cf565c2005-05-10 22:32:30 +010020
Thomas Rast0b444cd2010-01-10 00:33:00 +010021Conceptually, 'git write-tree' sync()s the current index contents
David Greaves2cf565c2005-05-10 22:32:30 +010022into a set of tree files.
23In order to have that match what is actually in your directory right
Thomas Rast0b444cd2010-01-10 00:33:00 +010024now, you need to have done a 'git update-index' phase before you did the
25'git write-tree'.
Jon Loeliger61f693b2005-12-05 23:13:03 -060026
David Greaves2cf565c2005-05-10 22:32:30 +010027
Bryan Larsen9c1fa702005-07-10 20:53:44 -070028OPTIONS
29-------
30--missing-ok::
Thomas Rast0b444cd2010-01-10 00:33:00 +010031 Normally 'git write-tree' ensures that the objects referenced by the
Jon Loeliger61f693b2005-12-05 23:13:03 -060032 directory exist in the object database. This option disables this
33 check.
David Greaves2cf565c2005-05-10 22:32:30 +010034
Junio C Hamano6bd20352006-04-26 01:20:50 -070035--prefix=<prefix>/::
36 Writes a tree object that represents a subdirectory
37 `<prefix>`. This can be used to write the tree object
38 for a subproject that is in the named subdirectory.
39
David Greaves2cf565c2005-05-10 22:32:30 +010040GIT
41---
Christian Couder9e1f0a82008-06-06 09:07:32 +020042Part of the linkgit:git[1] suite