<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">

<article lang="en" id="git-tar-tree(1)">
<articleinfo>
    <title>git-tar-tree(1)</title>
        <indexterm>
                <primary>git-tar-tree(1)</primary>
        </indexterm>
</articleinfo>
<simplesect id="_name">
<title>NAME</title>
<simpara>git-tar-tree - Create a tar archive of the files in the named tree object</simpara>
</simplesect>
<simplesect id="_synopsis">
<title>SYNOPSIS</title>
<simpara><emphasis>git tar-tree</emphasis> [--remote=&lt;repo&gt;] &lt;tree-ish&gt; [ &lt;base&gt; ]</simpara>
</simplesect>
<simplesect id="_description">
<title>DESCRIPTION</title>
<simpara>THIS COMMAND IS DEPRECATED.  Use <emphasis>git-archive</emphasis> with <literal>--format=tar</literal>
option instead (and move the &lt;base&gt; argument to <literal>--prefix=base/</literal>).</simpara>
<simpara>Creates a tar archive containing the tree structure for the named tree.
When &lt;base&gt; is specified it is added as a leading path to the files in the
generated tar archive.</simpara>
<simpara><emphasis>git-tar-tree</emphasis> behaves differently when given a tree ID versus when given
a commit ID or tag ID.  In the first case the current time is used as
modification time of each file in the archive.  In the latter case the
commit time as recorded in the referenced commit object is used instead.
Additionally the commit ID is stored in a global extended pax header.
It can be extracted using <emphasis>git-get-tar-commit-id</emphasis>.</simpara>
</simplesect>
<simplesect id="_options">
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term>
&lt;tree-ish&gt;
</term>
<listitem>
<simpara>
        The tree or commit to produce tar archive for.  If it is
        the object name of a commit object.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
&lt;base&gt;
</term>
<listitem>
<simpara>
        Leading path to the files in the resulting tar archive.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--remote=&lt;repo&gt;
</term>
<listitem>
<simpara>
        Instead of making a tar archive from local repository,
        retrieve a tar archive from a remote repository.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</simplesect>
<simplesect id="_configuration">
<title>CONFIGURATION</title>
<variablelist>
<varlistentry>
<term>
tar.umask
</term>
<listitem>
<simpara>
        This variable can be used to restrict the permission bits of
        tar archive entries.  The default is 0002, which turns off the
        world write bit.  The special value "user" indicates that the
        archiving user&#8217;s umask will be used instead.  See umask(2) for
        details.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</simplesect>
<simplesect id="_examples">
<title>EXAMPLES</title>
<variablelist>
<varlistentry>
<term>
git tar-tree HEAD junk | (cd /var/tmp/ &amp;&amp; tar xf -)
</term>
<listitem>
<simpara>
        Create a tar archive that contains the contents of the
        latest commit on the current branch, and extracts it in
        <literal>/var/tmp/junk</literal> directory.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
git tar-tree v1.4.0 git-1.4.0 | gzip &gt;git-1.4.0.tar.gz
</term>
<listitem>
<simpara>
        Create a tarball for v1.4.0 release.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
git tar-tree v1.4.0&#94;{tree} git-1.4.0 | gzip &gt;git-1.4.0.tar.gz
</term>
<listitem>
<simpara>
        Create a tarball for v1.4.0 release, but without a
        global extended pax header.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
git tar-tree --remote=example.com:git.git v1.4.0 &gt;git-1.4.0.tar
</term>
<listitem>
<simpara>
        Get a tarball v1.4.0 from example.com.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
git tar-tree HEAD:Documentation/ git-docs &gt; git-1.4.0-docs.tar
</term>
<listitem>
<simpara>
        Put everything in the current head&#8217;s Documentation/ directory
        into <emphasis>git-1.4.0-docs.tar</emphasis>, with the prefix <emphasis>git-docs/</emphasis>.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</simplesect>
<simplesect id="_author">
<title>Author</title>
<simpara>Written by Rene Scharfe.</simpara>
</simplesect>
<simplesect id="_documentation">
<title>Documentation</title>
<simpara>Documentation by David Greaves, Junio C Hamano and the git-list &lt;<ulink url="mailto:git@vger.kernel.org">git@vger.kernel.org</ulink>&gt;.</simpara>
</simplesect>
<simplesect id="_git">
<title>GIT</title>
<simpara>Part of the <xref linkend="git(1)"/> suite</simpara>
</simplesect>
</article>
