Code

1e1c7fa856a2b80bb839da805aa57d43f65f968e
[git.git] / Documentation / git-tar-tree.txt
1 git-tar-tree(1)
2 ===============
4 NAME
5 ----
6 git-tar-tree - Creates a tar archive of the files in the named tree
9 SYNOPSIS
10 --------
11 'git-tar-tree' [--remote=<repo>] <tree-ish> [ <base> ]
13 DESCRIPTION
14 -----------
15 Creates a tar archive containing the tree structure for the named tree.
16 When <base> is specified it is added as a leading path to the files in the
17 generated tar archive.
19 git-tar-tree behaves differently when given a tree ID versus when given
20 a commit ID or tag ID.  In the first case the current time is used as
21 modification time of each file in the archive.  In the latter case the
22 commit time as recorded in the referenced commit object is used instead.
23 Additionally the commit ID is stored in a global extended pax header.
24 It can be extracted using git-get-tar-commit-id.
26 OPTIONS
27 -------
29 <tree-ish>::
30         The tree or commit to produce tar archive for.  If it is
31         the object name of a commit object.
33 <base>::
34         Leading path to the files in the resulting tar archive.
36 --remote=<repo>::
37         Instead of making a tar archive from local repository,
38         retrieve a tar archive from a remote repository.
40 CONFIGURATION
41 -------------
42 By default, file and directories modes are set to 0666 or 0777. It is
43 possible to change this by setting the "umask" variable in the
44 repository configuration as follows :
46 [tar]
47         umask = 002     ;# group friendly
49 The special umask value "user" indicates that the user's current umask
50 will be used instead. The default value remains 0, which means world
51 readable/writable files and directories.
53 EXAMPLES
54 --------
55 git tar-tree HEAD junk | (cd /var/tmp/ && tar xf -)::
57         Create a tar archive that contains the contents of the
58         latest commit on the current branch, and extracts it in
59         `/var/tmp/junk` directory.
61 git tar-tree v1.4.0 git-1.4.0 | gzip >git-1.4.0.tar.gz::
63         Create a tarball for v1.4.0 release.
65 git tar-tree v1.4.0{caret}\{tree\} git-1.4.0 | gzip >git-1.4.0.tar.gz::
67         Create a tarball for v1.4.0 release, but without a
68         global extended pax header.
70 git tar-tree --remote=example.com:git.git v1.4.0 >git-1.4.0.tar::
72         Get a tarball v1.4.0 from example.com.
74 git tar-tree HEAD:Documentation/ git-docs > git-1.4.0-docs.tar::
76         Put everything in the current head's Documentation/ directory
77         into 'git-1.4.0-docs.tar', with the prefix 'git-docs/'.
79 Author
80 ------
81 Written by Rene Scharfe.
83 Documentation
84 --------------
85 Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
87 GIT
88 ---
89 Part of the gitlink:git[7] suite