1GIT-SEND-PACK(1)                  Git Manual                  GIT-SEND-PACK(1)
2
3
4

NAME

6       git-send-pack - Push objects over Git protocol to another repository
7

SYNOPSIS

9       git send-pack [--mirror] [--dry-run] [--force]
10                       [--receive-pack=<git-receive-pack>]
11                       [--verbose] [--thin] [--atomic]
12                       [--[no-]signed | --signed=(true|false|if-asked)]
13                       [<host>:]<directory> (--all | <ref>...)
14

DESCRIPTION

16       Usually you would want to use git push, which is a higher-level wrapper
17       of this command, instead. See git-push(1).
18
19       Invokes git-receive-pack on a possibly remote repository, and updates
20       it from the current repository, sending named refs.
21

OPTIONS

23       --receive-pack=<git-receive-pack>
24           Path to the git-receive-pack program on the remote end. Sometimes
25           useful when pushing to a remote repository over ssh, and you do not
26           have the program in a directory on the default $PATH.
27
28       --exec=<git-receive-pack>
29           Same as --receive-pack=<git-receive-pack>.
30
31       --all
32           Instead of explicitly specifying which refs to update, update all
33           heads that locally exist.
34
35       --stdin
36           Take the list of refs from stdin, one per line. If there are refs
37           specified on the command line in addition to this option, then the
38           refs from stdin are processed after those on the command line.
39
40           If --stateless-rpc is specified together with this option then the
41           list of refs must be in packet format (pkt-line). Each ref must be
42           in a separate packet, and the list must end with a flush packet.
43
44       --dry-run
45           Do everything except actually send the updates.
46
47       --force
48           Usually, the command refuses to update a remote ref that is not an
49           ancestor of the local ref used to overwrite it. This flag disables
50           the check. What this means is that the remote repository can lose
51           commits; use it with care.
52
53       --verbose
54           Run verbosely.
55
56       --thin
57           Send a "thin" pack, which records objects in deltified form based
58           on objects not included in the pack to reduce network traffic.
59
60       --atomic
61           Use an atomic transaction for updating the refs. If any of the refs
62           fails to update then the entire push will fail without changing any
63           refs.
64
65       --[no-]signed, --signed=(true|false|if-asked)
66           GPG-sign the push request to update refs on the receiving side, to
67           allow it to be checked by the hooks and/or be logged. If false or
68           --no-signed, no signing will be attempted. If true or --signed, the
69           push will fail if the server does not support signed pushes. If set
70           to if-asked, sign if and only if the server supports signed pushes.
71           The push will also fail if the actual call to gpg --sign fails. See
72           git-receive-pack(1) for the details on the receiving end.
73
74       --push-option=<string>
75           Pass the specified string as a push option for consumption by hooks
76           on the server side. If the server doesn’t support push options,
77           error out. See git-push(1) and githooks(5) for details.
78
79       <host>
80           A remote host to house the repository. When this part is specified,
81           git-receive-pack is invoked via ssh.
82
83       <directory>
84           The repository to update.
85
86       <ref>...
87           The remote refs to update.
88

SPECIFYING THE REFS

90       There are three ways to specify which refs to update on the remote end.
91
92       With --all flag, all refs that exist locally are transferred to the
93       remote side. You cannot specify any <ref> if you use this flag.
94
95       Without --all and without any <ref>, the heads that exist both on the
96       local side and on the remote side are updated.
97
98       When one or more <ref> are specified explicitly (whether on the command
99       line or via --stdin), it can be either a single pattern, or a pair of
100       such pattern separated by a colon ":" (this means that a ref name
101       cannot have a colon in it). A single pattern <name> is just a shorthand
102       for <name>:<name>.
103
104       Each pattern pair consists of the source side (before the colon) and
105       the destination side (after the colon). The ref to be pushed is
106       determined by finding a match that matches the source side, and where
107       it is pushed is determined by using the destination side. The rules
108       used to match a ref are the same rules used by git rev-parse to resolve
109       a symbolic ref name. See git-rev-parse(1).
110
111       •   It is an error if <src> does not match exactly one of the local
112           refs.
113
114       •   It is an error if <dst> matches more than one remote refs.
115
116       •   If <dst> does not match any remote ref, either
117
118           •   it has to start with "refs/"; <dst> is used as the destination
119               literally in this case.
120
121           •   <src> == <dst> and the ref that matched the <src> must not
122               exist in the set of remote refs; the ref matched <src> locally
123               is used as the name of the destination.
124
125       Without --force, the <src> ref is stored at the remote only if <dst>
126       does not exist, or <dst> is a proper subset (i.e. an ancestor) of
127       <src>. This check, known as "fast-forward check", is performed in order
128       to avoid accidentally overwriting the remote ref and lose other
129       peoples' commits from there.
130
131       With --force, the fast-forward check is disabled for all refs.
132
133       Optionally, a <ref> parameter can be prefixed with a plus + sign to
134       disable the fast-forward check only on that ref.
135

GIT

137       Part of the git(1) suite
138
139
140
141Git 2.39.1                        2023-01-13                  GIT-SEND-PACK(1)
Impressum