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