Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | git-write-tree(1) |
| 2 | ================= |
| 3 | |
| 4 | NAME |
| 5 | ---- |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 6 | git-write-tree - Create a tree object from the current index |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 11 | [verse] |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 12 | 'git write-tree' [--missing-ok] [--prefix=<prefix>/] |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 13 | |
| 14 | DESCRIPTION |
| 15 | ----------- |
Junio C Hamano | 92c64d5 | 2009-08-26 23:42:55 | [diff] [blame] | 16 | Creates a tree object using the current index. The name of the new |
| 17 | tree object is printed to standard output. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 18 | |
| 19 | The index must be in a fully merged state. |
| 20 | |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 21 | Conceptually, 'git write-tree' sync()s the current index contents |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 22 | into a set of tree files. |
| 23 | In order to have that match what is actually in your directory right |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 24 | now, you need to have done a 'git update-index' phase before you did the |
| 25 | 'git write-tree'. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 26 | |
| 27 | |
| 28 | OPTIONS |
| 29 | ------- |
| 30 | --missing-ok:: |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 31 | Normally 'git write-tree' ensures that the objects referenced by the |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 32 | directory exist in the object database. This option disables this |
| 33 | check. |
| 34 | |
Junio C Hamano | ad8c643 | 2006-06-18 09:26:43 | [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 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 40 | GIT |
| 41 | --- |
Junio C Hamano | f7c042d | 2008-06-06 22:50:53 | [diff] [blame] | 42 | Part of the linkgit:git[1] suite |