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