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 | ad8c643 | 2006-06-18 09:26:43 | [diff] [blame] | 11 | 'git-write-tree' [--missing-ok] [--prefix=<prefix>/] |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 12 | |
| 13 | DESCRIPTION |
| 14 | ----------- |
| 15 | Creates a tree object using the current index. |
| 16 | |
| 17 | The index must be in a fully merged state. |
| 18 | |
| 19 | Conceptually, `git-write-tree` sync()s the current index contents |
| 20 | into a set of tree files. |
| 21 | In order to have that match what is actually in your directory right |
| 22 | now, you need to have done a `git-update-index` phase before you did the |
| 23 | `git-write-tree`. |
| 24 | |
| 25 | |
| 26 | OPTIONS |
| 27 | ------- |
| 28 | --missing-ok:: |
| 29 | Normally `git-write-tree` ensures that the objects referenced by the |
| 30 | directory exist in the object database. This option disables this |
| 31 | check. |
| 32 | |
Junio C Hamano | ad8c643 | 2006-06-18 09:26:43 | [diff] [blame] | 33 | --prefix=<prefix>/:: |
| 34 | Writes a tree object that represents a subdirectory |
| 35 | `<prefix>`. This can be used to write the tree object |
| 36 | for a subproject that is in the named subdirectory. |
| 37 | |
| 38 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 39 | Author |
| 40 | ------ |
| 41 | Written by Linus Torvalds <torvalds@osdl.org> |
| 42 | |
| 43 | Documentation |
| 44 | -------------- |
| 45 | Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>. |
| 46 | |
| 47 | GIT |
| 48 | --- |
Junio C Hamano | 35738e8 | 2008-01-07 07:55:46 | [diff] [blame] | 49 | Part of the linkgit:git[7] suite |