1GIT-UPLOAD-ARCHIVE(1) Git Manual GIT-UPLOAD-ARCHIVE(1)
2
3
4
6 git-upload-archive - Send archive back to git-archive
7
9 git upload-archive <directory>
10
11
13 Invoked by git archive --remote and sends a generated archive to the
14 other end over the Git protocol.
15
16 This command is usually not invoked directly by the end user. The UI
17 for the protocol is on the git archive side, and the program pair is
18 meant to be used to get an archive from a remote repository.
19
21 In order to protect the privacy of objects that have been removed from
22 history but may not yet have been pruned, git-upload-archive avoids
23 serving archives for commits and trees that are not reachable from the
24 repository’s refs. However, because calculating object reachability is
25 computationally expensive, git-upload-archive implements a stricter but
26 easier-to-check set of rules:
27
28 1. Clients may request a commit or tree that is pointed to directly by
29 a ref. E.g., git archive --remote=origin v1.0.
30
31 2. Clients may request a sub-tree within a commit or tree using the
32 ref:path syntax. E.g., git archive --remote=origin
33 v1.0:Documentation.
34
35 3. Clients may not use other sha1 expressions, even if the end result
36 is reachable. E.g., neither a relative commit like master^ nor a
37 literal sha1 like abcd1234 is allowed, even if the result is
38 reachable from the refs.
39
40 Note that rule 3 disallows many cases that do not have any privacy
41 implications. These rules are subject to change in future versions of
42 git, and the server accessed by git archive --remote may or may not
43 follow these exact rules.
44
45 If the config option uploadArchive.allowUnreachable is true, these
46 rules are ignored, and clients may use arbitrary sha1 expressions. This
47 is useful if you do not care about the privacy of unreachable objects,
48 or if your object database is already publicly available for access via
49 non-smart-http.
50
52 <directory>
53 The repository to get a tar archive from.
54
56 Part of the git(1) suite
57
58
59
60Git 2.21.0 02/24/2019 GIT-UPLOAD-ARCHIVE(1)