git-write-tree.1   [plain text]


'\" t
.\"     Title: git-write-tree
.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\"      Date: 06/01/2011
.\"    Manual: Git Manual
.\"    Source: Git 1.7.5.4
.\"  Language: English
.\"
.TH "GIT\-WRITE\-TREE" "1" "06/01/2011" "Git 1\&.7\&.5\&.4" "Git Manual"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
git-write-tree \- Create a tree object from the current index
.SH "SYNOPSIS"
.sp
\fIgit write\-tree\fR [\-\-missing\-ok] [\-\-prefix=<prefix>/]
.SH "DESCRIPTION"
.sp
Creates a tree object using the current index\&. The name of the new tree object is printed to standard output\&.
.sp
The index must be in a fully merged state\&.
.sp
Conceptually, \fIgit write\-tree\fR sync()s the current index contents into a set of tree files\&. In order to have that match what is actually in your directory right now, you need to have done a \fIgit update\-index\fR phase before you did the \fIgit write\-tree\fR\&.
.SH "OPTIONS"
.PP
\-\-missing\-ok
.RS 4
Normally
\fIgit write\-tree\fR
ensures that the objects referenced by the directory exist in the object database\&. This option disables this check\&.
.RE
.PP
\-\-prefix=<prefix>/
.RS 4
Writes a tree object that represents a subdirectory
<prefix>\&. This can be used to write the tree object for a subproject that is in the named subdirectory\&.
.RE
.SH "GIT"
.sp
Part of the \fBgit\fR(1) suite