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