blob: 9e67f1730261a20ffa8c22b682c9207856901534 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-send-pack(1)
2================
3
4NAME
5----
Junio C Hamano01078922006-03-10 00:31:476git-send-pack - Push missing objects packed
Junio C Hamano1a4e8412005-12-27 08:17:237
8
9SYNOPSIS
10--------
11'git-send-pack' [--all] [--force] [--exec=<git-receive-pack>] [<host>:]<directory> [<ref>...]
12
13DESCRIPTION
14-----------
15Invokes 'git-receive-pack' on a possibly remote repository, and
16updates it from the current repository, sending named refs.
17
18
19OPTIONS
20-------
21--exec=<git-receive-pack>::
22Path to the 'git-receive-pack' program on the remote
23end. Sometimes useful when pushing to a remote
24repository over ssh, and you do not have the program in
25a directory on the default $PATH.
26
27--all::
28Instead of explicitly specifying which refs to update,
29update all refs that locally exist.
30
31--force::
32Usually, the command refuses to update a remote ref that
33is not an ancestor of the local ref used to overwrite it.
34This flag disables the check. What this means is that
35the remote repository can lose commits; use it with
36care.
37
38<host>::
39A remote host to house the repository. When this
40part is specified, 'git-receive-pack' is invoked via
41ssh.
42
43<directory>::
44The repository to update.
45
46<ref>...:
47The remote refs to update.
48
49
50Specifying the Refs
51-------------------
52
53There are three ways to specify which refs to update on the
54remote end.
55
Junio C Hamano341071d2006-06-04 07:24:4856With '--all' flag, all refs that exist locally are transferred to
Junio C Hamano1a4e8412005-12-27 08:17:2357the remote side. You cannot specify any '<ref>' if you use
58this flag.
59
60Without '--all' and without any '<ref>', the refs that exist
61both on the local side and on the remote side are updated.
62
63When one or more '<ref>' are specified explicitly, it can be either a
64single pattern, or a pair of such pattern separated by a colon
65":" (this means that a ref name cannot have a colon in it). A
66single pattern '<name>' is just a shorthand for '<name>:<name>'.
67
68Each pattern pair consists of the source side (before the colon)
69and the destination side (after the colon). The ref to be
70pushed is determined by finding a match that matches the source
71side, and where it is pushed is determined by using the
72destination side.
73
74 - It is an error if <src> does not match exactly one of the
75 local refs.
76
77 - It is an error if <dst> matches more than one remote refs.
78
79 - If <dst> does not match any remote ref, either
80
81 * it has to start with "refs/"; <dst> is used as the
82 destination literally in this case.
83
84 * <src> == <dst> and the ref that matched the <src> must not
85 exist in the set of remote refs; the ref matched <src>
86 locally is used as the name of the destination.
87
88Without '--force', the <src> ref is stored at the remote only if
89<dst> does not exist, or <dst> is a proper subset (i.e. an
90ancestor) of <src>. This check, known as "fast forward check",
91is performed in order to avoid accidentally overwriting the
92remote ref and lose other peoples' commits from there.
93
94With '--force', the fast forward check is disabled for all refs.
95
96Optionally, a <ref> parameter can be prefixed with a plus '+' sign
97to disable the fast-forward check only on that ref.
98
99
100Author
101------
102Written by Linus Torvalds <torvalds@osdl.org>
103
104Documentation
105--------------
106Documentation by Junio C Hamano.
107
108GIT
109---
110Part of the gitlink:git[7] suite