1GIT-SEND-PACK(1) Git Manual GIT-SEND-PACK(1)
2
3
4
6 git-send-pack - Push objects over Git protocol to another repository
7
9 git send-pack [--all] [--dry-run] [--force] [--receive-pack=<git-receive-pack>]
10 [--verbose] [--thin] [--atomic]
11 [--[no-]signed|--signed=(true|false|if-asked)]
12 [<host>:]<directory> [<ref>...]
13
15 Usually you would want to use git push, which is a higher-level wrapper
16 of this command, instead. See git-push(1).
17
18 Invokes git-receive-pack on a possibly remote repository, and updates
19 it from the current repository, sending named refs.
20
22 --receive-pack=<git-receive-pack>
23 Path to the git-receive-pack program on the remote end. Sometimes
24 useful when pushing to a remote repository over ssh, and you do not
25 have the program in a directory on the default $PATH.
26
27 --exec=<git-receive-pack>
28 Same as --receive-pack=<git-receive-pack>.
29
30 --all
31 Instead of explicitly specifying which refs to update, update all
32 heads that locally exist.
33
34 --stdin
35 Take the list of refs from stdin, one per line. If there are refs
36 specified on the command line in addition to this option, then the
37 refs from stdin are processed after those on the command line.
38
39 If --stateless-rpc is specified together with this option then the
40 list of refs must be in packet format (pkt-line). Each ref must be
41 in a separate packet, and the list must end with a flush packet.
42
43 --dry-run
44 Do everything except actually send the updates.
45
46 --force
47 Usually, the command refuses to update a remote ref that is not an
48 ancestor of the local ref used to overwrite it. This flag disables
49 the check. What this means is that the remote repository can lose
50 commits; use it with care.
51
52 --verbose
53 Run verbosely.
54
55 --thin
56 Send a "thin" pack, which records objects in deltified form based
57 on objects not included in the pack to reduce network traffic.
58
59 --atomic
60 Use an atomic transaction for updating the refs. If any of the refs
61 fails to update then the entire push will fail without changing any
62 refs.
63
64 --[no-]signed, --signed=(true|false|if-asked)
65 GPG-sign the push request to update refs on the receiving side, to
66 allow it to be checked by the hooks and/or be logged. If false or
67 --no-signed, no signing will be attempted. If true or --signed, the
68 push will fail if the server does not support signed pushes. If set
69 to if-asked, sign if and only if the server supports signed pushes.
70 The push will also fail if the actual call to gpg --sign fails. See
71 git-receive-pack(1) for the details on the receiving end.
72
73 --push-option=<string>
74 Pass the specified string as a push option for consumption by hooks
75 on the server side. If the server doesn’t support push options,
76 error out. See git-push(1) and githooks(5) for details.
77
78 <host>
79 A remote host to house the repository. When this part is specified,
80 git-receive-pack is invoked via ssh.
81
82 <directory>
83 The repository to update.
84
85 <ref>...
86 The remote refs to update.
87
89 There are three ways to specify which refs to update on the remote end.
90
91 With --all flag, all refs that exist locally are transferred to the
92 remote side. You cannot specify any <ref> if you use this flag.
93
94 Without --all and without any <ref>, the heads that exist both on the
95 local side and on the remote side are updated.
96
97 When one or more <ref> are specified explicitly (whether on the command
98 line or via --stdin), it can be either a single pattern, or a pair of
99 such pattern separated by a colon ":" (this means that a ref name
100 cannot have a colon in it). A single pattern <name> is just a shorthand
101 for <name>:<name>.
102
103 Each pattern pair consists of the source side (before the colon) and
104 the destination side (after the colon). The ref to be pushed is
105 determined by finding a match that matches the source side, and where
106 it is pushed is determined by using the destination side. The rules
107 used to match a ref are the same rules used by git rev-parse to resolve
108 a symbolic ref name. See git-rev-parse(1).
109
110 · It is an error if <src> does not match exactly one of the local
111 refs.
112
113 · It is an error if <dst> matches more than one remote refs.
114
115 · If <dst> does not match any remote ref, either
116
117 · it has to start with "refs/"; <dst> is used as the destination
118 literally in this case.
119
120 · <src> == <dst> and the ref that matched the <src> must not
121 exist in the set of remote refs; the ref matched <src> locally
122 is used as the name of the destination.
123
124 Without --force, the <src> ref is stored at the remote only if <dst>
125 does not exist, or <dst> is a proper subset (i.e. an ancestor) of
126 <src>. This check, known as "fast-forward check", is performed in order
127 to avoid accidentally overwriting the remote ref and lose other
128 peoples' commits from there.
129
130 With --force, the fast-forward check is disabled for all refs.
131
132 Optionally, a <ref> parameter can be prefixed with a plus + sign to
133 disable the fast-forward check only on that ref.
134
136 Part of the git(1) suite
137
138
139
140Git 2.26.2 2020-04-20 GIT-SEND-PACK(1)