blob: 74a6fddd9a9f9d6831922fb163240c2a2c06994e [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-tar-tree(1)
2===============
3
4NAME
5----
6git-tar-tree - Creates a tar archive of the files in the named tree
7
8
9SYNOPSIS
10--------
Junio C Hamano33db4372006-06-07 19:51:4511'git-tar-tree' [--remote=<repo>] <tree-ish> [ <base> ]
Junio C Hamano1a4e8412005-12-27 08:17:2312
13DESCRIPTION
14-----------
Junio C Hamano47c1e3c2006-09-25 04:45:5515THIS COMMAND IS DEPRECATED. Use `git-archive` with `--format=tar`
16option instead.
17
Junio C Hamano1a4e8412005-12-27 08:17:2318Creates a tar archive containing the tree structure for the named tree.
19When <base> is specified it is added as a leading path to the files in the
20generated tar archive.
21
22git-tar-tree behaves differently when given a tree ID versus when given
23a commit ID or tag ID. In the first case the current time is used as
24modification time of each file in the archive. In the latter case the
25commit time as recorded in the referenced commit object is used instead.
26Additionally the commit ID is stored in a global extended pax header.
27It can be extracted using git-get-tar-commit-id.
28
Junio C Hamano33db4372006-06-07 19:51:4529OPTIONS
30-------
31
32<tree-ish>::
33The tree or commit to produce tar archive for. If it is
34the object name of a commit object.
35
36<base>::
37Leading path to the files in the resulting tar archive.
38
39--remote=<repo>::
40Instead of making a tar archive from local repository,
41retrieve a tar archive from a remote repository.
42
Junio C Hamano75cc4c92006-07-24 08:25:0343CONFIGURATION
44-------------
45By default, file and directories modes are set to 0666 or 0777. It is
46possible to change this by setting the "umask" variable in the
47repository configuration as follows :
48
49[tar]
50 umask = 002 ;# group friendly
51
52The special umask value "user" indicates that the user's current umask
53will be used instead. The default value remains 0, which means world
54readable/writable files and directories.
55
56EXAMPLES
Junio C Hamano33db4372006-06-07 19:51:4557--------
Junio C Hamano74bbe902006-06-18 11:37:2458git tar-tree HEAD junk | (cd /var/tmp/ && tar xf -)::
Junio C Hamano33db4372006-06-07 19:51:4559
60Create a tar archive that contains the contents of the
61latest commit on the current branch, and extracts it in
62`/var/tmp/junk` directory.
63
Junio C Hamano74bbe902006-06-18 11:37:2464git tar-tree v1.4.0 git-1.4.0 | gzip >git-1.4.0.tar.gz::
Junio C Hamano33db4372006-06-07 19:51:4565
Junio C Hamano74bbe902006-06-18 11:37:2466Create a tarball for v1.4.0 release.
Junio C Hamano33db4372006-06-07 19:51:4567
Junio C Hamano74bbe902006-06-18 11:37:2468git tar-tree v1.4.0{caret}\{tree\} git-1.4.0 | gzip >git-1.4.0.tar.gz::
Junio C Hamano33db4372006-06-07 19:51:4569
Junio C Hamano74bbe902006-06-18 11:37:2470Create a tarball for v1.4.0 release, but without a
71global extended pax header.
72
73git tar-tree --remote=example.com:git.git v1.4.0 >git-1.4.0.tar::
74
75Get a tarball v1.4.0 from example.com.
Junio C Hamano1a4e8412005-12-27 08:17:2376
Junio C Hamanoc99ab982006-07-31 08:45:1277git tar-tree HEAD:Documentation/ git-docs > git-1.4.0-docs.tar::
78
79Put everything in the current head's Documentation/ directory
80into 'git-1.4.0-docs.tar', with the prefix 'git-docs/'.
81
Junio C Hamano1a4e8412005-12-27 08:17:2382Author
83------
84Written by Rene Scharfe.
85
86Documentation
87--------------
88Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
89
90GIT
91---
92Part of the gitlink:git[7] suite
93