]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-tar-tree.txt
War on whitespace
[thirdparty/git.git] / Documentation / git-tar-tree.txt
CommitLineData
2cf565c5
DG
1git-tar-tree(1)
2===============
2cf565c5
DG
3
4NAME
5----
c3f0baac 6git-tar-tree - Create a tar archive of the files in the named tree object
2cf565c5
DG
7
8
9SYNOPSIS
10--------
34925d35 11'git-tar-tree' [--remote=<repo>] <tree-ish> [ <base> ]
2cf565c5
DG
12
13DESCRIPTION
14-----------
fd88d9c8 15THIS COMMAND IS DEPRECATED. Use `git-archive` with `--format=tar`
9f1beb71 16option instead (and move the <base> argument to `--prefix=base/`).
fd88d9c8 17
2cf565c5 18Creates a tar archive containing the tree structure for the named tree.
2c6e4771 19When <base> is specified it is added as a leading path to the files in the
2cf565c5
DG
20generated tar archive.
21
d3a15c49
RS
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
34925d35
JH
29OPTIONS
30-------
31
32<tree-ish>::
33 The tree or commit to produce tar archive for. If it is
34 the object name of a commit object.
35
36<base>::
37 Leading path to the files in the resulting tar archive.
38
39--remote=<repo>::
40 Instead of making a tar archive from local repository,
41 retrieve a tar archive from a remote repository.
42
ce1a79b6
WT
43CONFIGURATION
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
0f2ba25d 53will be used instead. The default value is 002, which means group
ce1a79b6
WT
54readable/writable files and directories.
55
56EXAMPLES
34925d35 57--------
9236cdd4 58git tar-tree HEAD junk | (cd /var/tmp/ && tar xf -)::
34925d35
JH
59
60 Create a tar archive that contains the contents of the
61 latest commit on the current branch, and extracts it in
62 `/var/tmp/junk` directory.
63
9236cdd4 64git tar-tree v1.4.0 git-1.4.0 | gzip >git-1.4.0.tar.gz::
34925d35 65
9236cdd4 66 Create a tarball for v1.4.0 release.
34925d35 67
9236cdd4 68git tar-tree v1.4.0{caret}\{tree\} git-1.4.0 | gzip >git-1.4.0.tar.gz::
34925d35 69
9236cdd4
RS
70 Create a tarball for v1.4.0 release, but without a
71 global extended pax header.
72
73git tar-tree --remote=example.com:git.git v1.4.0 >git-1.4.0.tar::
74
75 Get a tarball v1.4.0 from example.com.
2cf565c5 76
b63fafdf
JS
77git tar-tree HEAD:Documentation/ git-docs > git-1.4.0-docs.tar::
78
79 Put everything in the current head's Documentation/ directory
80 into 'git-1.4.0-docs.tar', with the prefix 'git-docs/'.
81
2cf565c5
DG
82Author
83------
d3a15c49 84Written by Rene Scharfe.
2cf565c5
DG
85
86Documentation
87--------------
88Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
89
90GIT
91---
a7154e91 92Part of the gitlink:git[7] suite