blob: a5d9558dd1eabd71e838026721d707c5f1ecc369 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-tar-tree(1)
2===============
3
4NAME
5----
Junio C Hamano7c73c662007-01-19 00:37:506git-tar-tree - Create a tar archive of the files in the named tree object
Junio C Hamano1a4e8412005-12-27 08:17:237
8
9SYNOPSIS
10--------
Junio C Hamanofce7c7e2008-07-02 03:06:3811'git tar-tree' [--remote=<repo>] <tree-ish> [ <base> ]
Junio C Hamano1a4e8412005-12-27 08:17:2312
13DESCRIPTION
14-----------
Junio C Hamanoba4b9282008-07-06 05:20:3115THIS COMMAND IS DEPRECATED. Use 'git-archive' with `--format=tar`
Junio C Hamano22bfb1f2007-04-19 02:58:4316option instead (and move the <base> argument to `--prefix=base/`).
Junio C Hamano47c1e3c2006-09-25 04:45:5517
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
Junio C Hamanoba4b9282008-07-06 05:20:3122'git-tar-tree' behaves differently when given a tree ID versus when given
Junio C Hamano1a4e8412005-12-27 08:17:2323a 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.
Junio C Hamanoba4b9282008-07-06 05:20:3127It can be extracted using 'git-get-tar-commit-id'.
Junio C Hamano1a4e8412005-12-27 08:17:2328
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-------------
Junio C Hamano75cc4c92006-07-24 08:25:0345
Junio C Hamanobdebabb2007-08-23 00:25:0946tar.umask::
47This variable can be used to restrict the permission bits of
48tar archive entries. The default is 0002, which turns off the
49world write bit. The special value "user" indicates that the
50archiving user's umask will be used instead. See umask(2) for
51details.
Junio C Hamano75cc4c92006-07-24 08:25:0352
53EXAMPLES
Junio C Hamano33db4372006-06-07 19:51:4554--------
Junio C Hamano74bbe902006-06-18 11:37:2455git tar-tree HEAD junk | (cd /var/tmp/ && tar xf -)::
Junio C Hamano33db4372006-06-07 19:51:4556
57Create a tar archive that contains the contents of the
58latest commit on the current branch, and extracts it in
59`/var/tmp/junk` directory.
60
Junio C Hamano74bbe902006-06-18 11:37:2461git tar-tree v1.4.0 git-1.4.0 | gzip >git-1.4.0.tar.gz::
Junio C Hamano33db4372006-06-07 19:51:4562
Junio C Hamano74bbe902006-06-18 11:37:2463Create a tarball for v1.4.0 release.
Junio C Hamano33db4372006-06-07 19:51:4564
Junio C Hamano74bbe902006-06-18 11:37:2465git 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:4566
Junio C Hamano74bbe902006-06-18 11:37:2467Create a tarball for v1.4.0 release, but without a
68global extended pax header.
69
70git tar-tree --remote=example.com:git.git v1.4.0 >git-1.4.0.tar::
71
72Get a tarball v1.4.0 from example.com.
Junio C Hamano1a4e8412005-12-27 08:17:2373
Junio C Hamanoc99ab982006-07-31 08:45:1274git tar-tree HEAD:Documentation/ git-docs > git-1.4.0-docs.tar::
75
76Put everything in the current head's Documentation/ directory
77into 'git-1.4.0-docs.tar', with the prefix 'git-docs/'.
78
Junio C Hamano1a4e8412005-12-27 08:17:2379Author
80------
81Written by Rene Scharfe.
82
83Documentation
84--------------
85Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
86
87GIT
88---
Junio C Hamanof7c042d2008-06-06 22:50:5389Part of the linkgit:git[1] suite