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