]>
Commit | Line | Data |
---|---|---|
2cf565c5 DG |
1 | git-tar-tree(1) |
2 | =============== | |
2cf565c5 DG |
3 | |
4 | NAME | |
5 | ---- | |
c3f0baac | 6 | git-tar-tree - Create a tar archive of the files in the named tree object |
2cf565c5 DG |
7 | |
8 | ||
9 | SYNOPSIS | |
10 | -------- | |
7791a1d9 | 11 | [verse] |
b1889c36 | 12 | 'git tar-tree' [--remote=<repo>] <tree-ish> [ <base> ] |
2cf565c5 DG |
13 | |
14 | DESCRIPTION | |
15 | ----------- | |
0b444cdb | 16 | THIS COMMAND IS DEPRECATED. Use 'git archive' with `--format=tar` |
9f1beb71 | 17 | option instead (and move the <base> argument to `--prefix=base/`). |
fd88d9c8 | 18 | |
2cf565c5 | 19 | Creates a tar archive containing the tree structure for the named tree. |
2c6e4771 | 20 | When <base> is specified it is added as a leading path to the files in the |
2cf565c5 DG |
21 | generated tar archive. |
22 | ||
0b444cdb | 23 | 'git tar-tree' behaves differently when given a tree ID versus when given |
d3a15c49 RS |
24 | a commit ID or tag ID. In the first case the current time is used as |
25 | modification time of each file in the archive. In the latter case the | |
26 | commit time as recorded in the referenced commit object is used instead. | |
27 | Additionally the commit ID is stored in a global extended pax header. | |
0b444cdb | 28 | It can be extracted using 'git get-tar-commit-id'. |
d3a15c49 | 29 | |
34925d35 JH |
30 | OPTIONS |
31 | ------- | |
32 | ||
33 | <tree-ish>:: | |
34 | The tree or commit to produce tar archive for. If it is | |
35 | the object name of a commit object. | |
36 | ||
37 | <base>:: | |
38 | Leading path to the files in the resulting tar archive. | |
39 | ||
40 | --remote=<repo>:: | |
41 | Instead of making a tar archive from local repository, | |
42 | retrieve a tar archive from a remote repository. | |
43 | ||
ce1a79b6 WT |
44 | CONFIGURATION |
45 | ------------- | |
ce1a79b6 | 46 | |
687157c7 RS |
47 | tar.umask:: |
48 | This variable can be used to restrict the permission bits of | |
49 | tar archive entries. The default is 0002, which turns off the | |
50 | world write bit. The special value "user" indicates that the | |
51 | archiving user's umask will be used instead. See umask(2) for | |
52 | details. | |
ce1a79b6 WT |
53 | |
54 | EXAMPLES | |
34925d35 | 55 | -------- |
5d2fc913 | 56 | `git tar-tree HEAD junk | (cd /var/tmp/ && tar xf -)`:: |
34925d35 JH |
57 | |
58 | Create a tar archive that contains the contents of the | |
59 | latest commit on the current branch, and extracts it in | |
60 | `/var/tmp/junk` directory. | |
61 | ||
5d2fc913 | 62 | `git tar-tree v1.4.0 git-1.4.0 | gzip >git-1.4.0.tar.gz`:: |
34925d35 | 63 | |
9236cdd4 | 64 | Create a tarball for v1.4.0 release. |
34925d35 | 65 | |
6cf378f0 | 66 | `git tar-tree v1.4.0^{tree} git-1.4.0 | gzip >git-1.4.0.tar.gz`:: |
34925d35 | 67 | |
9236cdd4 RS |
68 | Create a tarball for v1.4.0 release, but without a |
69 | global extended pax header. | |
70 | ||
5d2fc913 | 71 | `git tar-tree --remote=example.com:git.git v1.4.0 >git-1.4.0.tar`:: |
9236cdd4 RS |
72 | |
73 | Get a tarball v1.4.0 from example.com. | |
2cf565c5 | 74 | |
5d2fc913 | 75 | `git tar-tree HEAD:Documentation/ git-docs > git-1.4.0-docs.tar`:: |
b63fafdf JS |
76 | |
77 | Put everything in the current head's Documentation/ directory | |
78 | into 'git-1.4.0-docs.tar', with the prefix 'git-docs/'. | |
79 | ||
2cf565c5 DG |
80 | GIT |
81 | --- | |
9e1f0a85 | 82 | Part of the linkgit:git[1] suite |