]>
Commit | Line | Data |
---|---|---|
215a7ad1 JH |
1 | git-push(1) |
2 | =========== | |
7fc9d69f JH |
3 | |
4 | NAME | |
5 | ---- | |
215a7ad1 | 6 | git-push - Update remote refs along with associated objects. |
7fc9d69f JH |
7 | |
8 | ||
9 | SYNOPSIS | |
10 | -------- | |
42301e34 | 11 | 'git-push' [--all] [--tags] [--force] <repository> <refspec>... |
7fc9d69f JH |
12 | |
13 | DESCRIPTION | |
14 | ----------- | |
ab9b3138 JH |
15 | |
16 | Updates remote refs using local refs, while sending objects | |
17 | necessary to complete the given refs. | |
7fc9d69f | 18 | |
eb0362a4 JH |
19 | You can make "interesting" things to happen on the repository |
20 | every time you push into it, by setting up 'hooks' there. See | |
21 | documentation for gitlink:git-receive-pack[1]. | |
22 | ||
7fc9d69f JH |
23 | |
24 | OPTIONS | |
25 | ------- | |
3598a308 BF |
26 | <repository>:: |
27 | The "remote" repository that is destination of a push operation. | |
28 | include::urls.txt[] | |
29 | ||
30 | <refspec>:: | |
31 | The canonical format of a <refspec> parameter is | |
32 | `+?<src>:<dst>`; that is, an optional plus `+`, followed | |
33 | by the source ref, followed by a colon `:`, followed by | |
34 | the destination ref. | |
35 | + | |
36 | The <src> side can be an | |
37 | arbitrary "SHA1 expression" that can be used as an | |
38 | argument to `git-cat-file -t`. E.g. `master~4` (push | |
39 | four parents before the current master head). | |
40 | + | |
41 | The local ref that matches <src> is used | |
42 | to fast forward the remote ref that matches <dst>. If | |
43 | the optional plus `+` is used, the remote ref is updated | |
44 | even if it does not result in a fast forward update. | |
45 | + | |
46 | Some short-cut notations are also supported. | |
47 | + | |
48 | * `tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`. | |
49 | * A parameter <ref> without a colon is equivalent to | |
50 | <ref>`:`<ref>, hence updates <ref> in the destination from <ref> | |
51 | in the source. | |
7fc9d69f | 52 | |
d6a73596 JH |
53 | \--all:: |
54 | Instead of naming each ref to push, specifies all refs | |
55 | to be pushed. | |
56 | ||
42301e34 JH |
57 | \--tags:: |
58 | All refs under `$GIT_DIR/refs/tags` are pushed, in | |
59 | addition to refspecs explicitly listed on the command | |
60 | line. | |
61 | ||
d6a73596 | 62 | -f, \--force:: |
f0fff36e BF |
63 | Usually, the command refuses to update a remote ref that is |
64 | not a descendent of the local ref used to overwrite it. | |
65 | This flag disables the check. This can cause the | |
66 | remote repository to lose commits; use it with care. | |
7fc9d69f | 67 | |
eb0362a4 | 68 | |
7fc9d69f JH |
69 | Author |
70 | ------ | |
71 | Written by Junio C Hamano <junkio@cox.net> | |
72 | ||
73 | Documentation | |
74 | -------------- | |
75 | Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>. | |
76 | ||
77 | GIT | |
78 | --- | |
a7154e91 | 79 | Part of the gitlink:git[7] suite |
7fc9d69f | 80 |