1GIT-TAR-TREE(1) Git Manual GIT-TAR-TREE(1)
2
3
4
6 git-tar-tree - Create a tar archive of the files in the named tree
7 object
8
10 git tar-tree [--remote=<repo>] <tree-ish> [ <base> ]
11
12
14 THIS COMMAND IS DEPRECATED. Use git archive with --format=tar option
15 instead (and move the <base> argument to --prefix=base/).
16
17 Creates a tar archive containing the tree structure for the named tree.
18 When <base> is specified it is added as a leading path to the files in
19 the generated tar archive.
20
21 git tar-tree behaves differently when given a tree ID versus when given
22 a commit ID or tag ID. In the first case the current time is used as
23 modification time of each file in the archive. In the latter case the
24 commit time as recorded in the referenced commit object is used
25 instead. Additionally the commit ID is stored in a global extended pax
26 header. It can be extracted using git get-tar-commit-id.
27
29 <tree-ish>
30 The tree or commit to produce tar archive for. If it is the object
31 name of a commit object.
32
33 <base>
34 Leading path to the files in the resulting tar archive.
35
36 --remote=<repo>
37 Instead of making a tar archive from local repository, retrieve a
38 tar archive from a remote repository.
39
41 tar.umask
42 This variable can be used to restrict the permission bits of tar
43 archive entries. The default is 0002, which turns off the world
44 write bit. The special value "user" indicates that the archiving
45 user’s umask will be used instead. See umask(2) for details.
46
48 git tar-tree HEAD junk | (cd /var/tmp/ && tar xf -)
49 Create a tar archive that contains the contents of the latest
50 commit on the current branch, and extracts it in /var/tmp/junk
51 directory.
52
53 git tar-tree v1.4.0 git-1.4.0 | gzip >git-1.4.0.tar.gz
54 Create a tarball for v1.4.0 release.
55
56 git tar-tree v1.4.0^{tree} git-1.4.0 | gzip >git-1.4.0.tar.gz
57 Create a tarball for v1.4.0 release, but without a global extended
58 pax header.
59
60 git tar-tree --remote=example.com:git.git v1.4.0 >git-1.4.0.tar
61 Get a tarball v1.4.0 from example.com.
62
63 git tar-tree HEAD:Documentation/ git-docs > git-1.4.0-docs.tar
64 Put everything in the current head’s Documentation/ directory into
65 git-1.4.0-docs.tar, with the prefix git-docs/.
66
68 Part of the git(1) suite
69
70
71
72Git 1.8.3.1 11/19/2018 GIT-TAR-TREE(1)