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]
10 [--receive-pack=<git-receive-pack>] [--verbose] [--thin]
11 [<host>:]<directory> [<ref>...]
12
14 Usually you would want to use git push, which is a higher-level wrapper
15 of this command, instead. See git-push(1).
16
17 Invokes git-receive-pack on a possibly remote repository, and updates
18 it from the current repository, sending named refs.
19
21 --receive-pack=<git-receive-pack>
22 Path to the git-receive-pack program on the remote end. Sometimes
23 useful when pushing to a remote repository over ssh, and you do not
24 have the program in a directory on the default $PATH.
25
26 --exec=<git-receive-pack>
27 Same as --receive-pack=<git-receive-pack>.
28
29 --all
30 Instead of explicitly specifying which refs to update, update all
31 heads that locally exist.
32
33 --dry-run
34 Do everything except actually send the updates.
35
36 --force
37 Usually, the command refuses to update a remote ref that is not an
38 ancestor of the local ref used to overwrite it. This flag disables
39 the check. What this means is that the remote repository can lose
40 commits; use it with care.
41
42 --verbose
43 Run verbosely.
44
45 --thin
46 Send a "thin" pack, which records objects in deltified form based
47 on objects not included in the pack to reduce network traffic.
48
49 <host>
50 A remote host to house the repository. When this part is specified,
51 git-receive-pack is invoked via ssh.
52
53 <directory>
54 The repository to update.
55
56 <ref>...
57 The remote refs to update.
58
60 There are three ways to specify which refs to update on the remote end.
61
62 With --all flag, all refs that exist locally are transferred to the
63 remote side. You cannot specify any <ref> if you use this flag.
64
65 Without --all and without any <ref>, the heads that exist both on the
66 local side and on the remote side are updated.
67
68 When one or more <ref> are specified explicitly, it can be either a
69 single pattern, or a pair of such pattern separated by a colon ":"
70 (this means that a ref name cannot have a colon in it). A single
71 pattern <name> is just a shorthand for <name>:<name>.
72
73 Each pattern pair consists of the source side (before the colon) and
74 the destination side (after the colon). The ref to be pushed is
75 determined by finding a match that matches the source side, and where
76 it is pushed is determined by using the destination side. The rules
77 used to match a ref are the same rules used by git rev-parse to resolve
78 a symbolic ref name. See git-rev-parse(1).
79
80 · It is an error if <src> does not match exactly one of the local
81 refs.
82
83 · It is an error if <dst> matches more than one remote refs.
84
85 · If <dst> does not match any remote ref, either
86
87 · it has to start with "refs/"; <dst> is used as the destination
88 literally in this case.
89
90 · <src> == <dst> and the ref that matched the <src> must not
91 exist in the set of remote refs; the ref matched <src> locally
92 is used as the name of the destination.
93
94 Without --force, the <src> ref is stored at the remote only if <dst>
95 does not exist, or <dst> is a proper subset (i.e. an ancestor) of
96 <src>. This check, known as "fast-forward check", is performed in order
97 to avoid accidentally overwriting the remote ref and lose other
98 peoples' commits from there.
99
100 With --force, the fast-forward check is disabled for all refs.
101
102 Optionally, a <ref> parameter can be prefixed with a plus + sign to
103 disable the fast-forward check only on that ref.
104
106 Written by Linus Torvalds <torvalds@osdl.org[1]>
107
109 Documentation by Junio C Hamano.
110
112 Part of the git(1) suite
113
115 1. torvalds@osdl.org
116 mailto:torvalds@osdl.org
117
118
119
120Git 1.7.4.4 04/11/2011 GIT-SEND-PACK(1)