David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 1 | git-write-tree(1) |
| 2 | ================= |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 3 | |
| 4 | NAME |
| 5 | ---- |
Junio C Hamano | c3f0baa | 2007-01-18 15:53:37 -0800 | [diff] [blame] | 6 | git-write-tree - Create a tree object from the current index |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
Martin von Zweigbergk | 7791a1d | 2011-07-01 22:38:26 -0400 | [diff] [blame] | 11 | [verse] |
Jonathan Nieder | b1889c3 | 2008-06-30 01:09:04 -0500 | [diff] [blame] | 12 | 'git write-tree' [--missing-ok] [--prefix=<prefix>/] |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 13 | |
| 14 | DESCRIPTION |
| 15 | ----------- |
David Kågedal | 8d95184 | 2009-08-26 16:04:54 +0200 | [diff] [blame] | 16 | Creates a tree object using the current index. The name of the new |
| 17 | tree object is printed to standard output. |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 18 | |
Jon Loeliger | 61f693b | 2005-12-05 23:13:03 -0600 | [diff] [blame] | 19 | The index must be in a fully merged state. |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 20 | |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 21 | Conceptually, 'git write-tree' sync()s the current index contents |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 22 | into a set of tree files. |
| 23 | In order to have that match what is actually in your directory right |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 24 | now, you need to have done a 'git update-index' phase before you did the |
| 25 | 'git write-tree'. |
Jon Loeliger | 61f693b | 2005-12-05 23:13:03 -0600 | [diff] [blame] | 26 | |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 27 | |
Bryan Larsen | 9c1fa70 | 2005-07-10 20:53:44 -0700 | [diff] [blame] | 28 | OPTIONS |
| 29 | ------- |
| 30 | --missing-ok:: |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 31 | Normally 'git write-tree' ensures that the objects referenced by the |
Jon Loeliger | 61f693b | 2005-12-05 23:13:03 -0600 | [diff] [blame] | 32 | directory exist in the object database. This option disables this |
| 33 | check. |
David Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 34 | |
Junio C Hamano | 6bd2035 | 2006-04-26 01:20:50 -0700 | [diff] [blame] | 35 | --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 Greaves | 2cf565c | 2005-05-10 22:32:30 +0100 | [diff] [blame] | 40 | GIT |
| 41 | --- |
Christian Couder | 9e1f0a8 | 2008-06-06 09:07:32 +0200 | [diff] [blame] | 42 | Part of the linkgit:git[1] suite |