1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
\r
4 <article lang="en" id="git-write-tree(1)">
\r
6 <title>git-write-tree(1)</title>
\r
8 <primary>git-write-tree(1)</primary>
\r
11 <simplesect id="_name">
\r
13 <simpara>git-write-tree - Create a tree object from the current index</simpara>
\r
15 <simplesect id="_synopsis">
\r
16 <title>SYNOPSIS</title>
\r
18 <literallayout><emphasis>git write-tree</emphasis> [--missing-ok] [--prefix=<prefix>/]</literallayout>
\r
21 <simplesect id="_description">
\r
22 <title>DESCRIPTION</title>
\r
23 <simpara>Creates a tree object using the current index. The name of the new
\r
24 tree object is printed to standard output.</simpara>
\r
25 <simpara>The index must be in a fully merged state.</simpara>
\r
26 <simpara>Conceptually, <emphasis>git write-tree</emphasis> sync()s the current index contents
\r
27 into a set of tree files.
\r
28 In order to have that match what is actually in your directory right
\r
29 now, you need to have done a <emphasis>git update-index</emphasis> phase before you did the
\r
30 <emphasis>git write-tree</emphasis>.</simpara>
\r
32 <simplesect id="_options">
\r
33 <title>OPTIONS</title>
\r
41 Normally <emphasis>git write-tree</emphasis> ensures that the objects referenced by the
\r
42 directory exist in the object database. This option disables this
\r
49 --prefix=<prefix>/
\r
53 Writes a tree object that represents a subdirectory
\r
54 <emphasis><prefix></emphasis>. This can be used to write the tree object
\r
55 for a subproject that is in the named subdirectory.
\r
61 <simplesect id="_git">
\r
63 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>
\r