.\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Ip \" List item .br .ie \\n(.$>=3 .ne \\$3 .el .ne 3 .IP "\\$1" \\$2 .. .TH "GIT-PUSH" 1 "" "" "" .SH NAME git-push \- Update remote refs along with associated objects .SH "SYNOPSIS" \fIgit\-push\fR [\-\-all] [\-\-tags] [\-\-force] ... .SH "DESCRIPTION" Updates remote refs using local refs, while sending objects necessary to complete the given refs\&. You can make interesting things happen to a repository every time you push into it, by setting up \fIhooks\fR there\&. See documentation for \fBgit\-receive\-pack\fR(1)\&. .SH "OPTIONS" .TP The "remote" repository that is destination of a push operation\&. See the section GIT URLS below\&. .TP The canonical format of a parameter is +?:; that is, an optional plus +, followed by the source ref, followed by a colon :, followed by the destination ref\&. The side can be an arbitrary "SHA1 expression" that can be used as an argument to git\-cat\-file \-t\&. E\&.g\&. master~4 (push four parents before the current master head)\&. The local ref that matches is used to fast forward the remote ref that matches \&. If the optional plus + is used, the remote ref is updated even if it does not result in a fast forward update\&. Note: If no explicit refspec is found, (that is neither on the command line nor in any Push line of the corresponding remotes file\-\-\-see below), then all the refs that exist both on the local side and on the remote side are updated\&. Some short\-cut notations are also supported\&. .RS .TP 3 \(bu tag means the same as refs/tags/:refs/tags/\&. .TP \(bu A parameter without a colon is equivalent to :, hence updates in the destination from in the source\&. .LP .RE .IP .TP \-\-all Instead of naming each ref to push, specifies that all refs be pushed\&. .TP \-\-tags All refs under $GIT_DIR/refs/tags are pushed, in addition to refspecs explicitly listed on the command line\&. .TP \-f, \-\-force Usually, the command refuses to update a remote ref that is not a descendent of the local ref used to overwrite it\&. This flag disables the check\&. This can cause the remote repository to lose commits; use it with care\&. .SH "GIT URLS" One of the following notations can be used to name the remote repository: .IP .TP 3 \(bu rsync://host\&.xz/path/to/repo\&.git/ .TP \(bu http://host\&.xz/path/to/repo\&.git/ .TP \(bu https://host\&.xz/path/to/repo\&.git/ .TP \(bu git://host\&.xz/path/to/repo\&.git/ .TP \(bu git://host\&.xz/~user/path/to/repo\&.git/ .TP \(bu ssh://host\&.xz/path/to/repo\&.git/ .TP \(bu ssh://host\&.xz/~user/path/to/repo\&.git/ .TP \(bu ssh://host\&.xz/~/path/to/repo\&.git .LP SSH Is the default transport protocol and also supports an scp\-like syntax\&. Both syntaxes support username expansion, as does the native git protocol\&. The following three are identical to the last three above, respectively: .IP .TP 3 \(bu host\&.xz:/path/to/repo\&.git/ .TP \(bu host\&.xz:~user/path/to/repo\&.git/ .TP \(bu host\&.xz:path/to/repo\&.git .LP To sync with a local directory, use: .IP .TP 3 \(bu /path/to/repo\&.git/ .LP .SH "REMOTES" In addition to the above, as a short\-hand, the name of a file in $GIT_DIR/remotes directory can be given; the named file should be in the following format: .nf URL: one of the above URL format Push: Pull: .fi Then such a short\-hand is specified in place of without parameters on the command line, specified on Push: lines or Pull: lines are used for git\-push and git\-fetch/git\-pull, respectively\&. Multiple Push: and and Pull: lines may be specified for additional branch mappings\&. The name of a file in $GIT_DIR/branches directory can be specified as an older notation short\-hand; the named file should contain a single line, a URL in one of the above formats, optionally followed by a hash # and the name of remote head (URL fragment notation)\&. $GIT_DIR/branches/ file that stores a without the fragment is equivalent to have this in the corresponding file in the $GIT_DIR/remotes/ directory\&. .nf URL: Pull: refs/heads/master: .fi while having # is equivalent to .nf URL: Pull: refs/heads/: .fi .SH "AUTHOR" Written by Junio C Hamano .SH "DOCUMENTATION" Documentation by Junio C Hamano and the git\-list \&. .SH "GIT" Part of the \fBgit\fR(7) suite