Merge branch 'am/maint-push-doc'

* am/maint-push-doc:
  Documentation: avoid using undefined parameters
  Documentation: mention branches rather than heads
  Documentation: remove a redundant elaboration
  Documentation: git push repository can also be a remote
This commit is contained in:
Junio C Hamano 2009-01-21 16:51:28 -08:00
commit 664a3348b2

View File

@ -28,7 +28,9 @@ OPTIONS
------- -------
<repository>:: <repository>::
The "remote" repository that is destination of a push The "remote" repository that is destination of a push
operation. See the section <<URLS,GIT URLS>> below. operation. This parameter can be either a URL
(see the section <<URLS,GIT URLS>> below) or the name
of a remote (see the section <<REMOTES,REMOTES>> below).
<refspec>...:: <refspec>...::
The canonical format of a <refspec> parameter is The canonical format of a <refspec> parameter is
@ -42,22 +44,21 @@ tip of `master` branch); see linkgit:git-rev-parse[1]) that you
want to push. The <dst> side represents the destination location. want to push. The <dst> side represents the destination location.
+ +
The local ref that matches <src> is used The local ref that matches <src> is used
to fast forward the remote ref that matches <dst> (or, if no <dst> was to fast forward the remote ref that matches <dst>. If
specified, the same ref that <src> referred to locally). If
the optional leading plus `+` is used, the remote ref is updated the optional leading plus `+` is used, the remote ref is updated
even if it does not result in a fast forward update. even if it does not result in a fast forward update.
+ +
`tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`. `tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`.
+ +
A parameter <ref> without a colon pushes the <ref> from the source A lonely <src> parameter (without a colon and a destination) pushes
repository to the destination repository under the same name. the <src> to the same name in the destination repository.
+ +
Pushing an empty <src> allows you to delete the <dst> ref from Pushing an empty <src> allows you to delete the <dst> ref from
the remote repository. the remote repository.
+ +
The special refspec `:` (or `+:` to allow non-fast forward updates) The special refspec `:` (or `+:` to allow non-fast forward updates)
directs git to push "matching" heads: for every head that exists on directs git to push "matching" branches: for every branch that exists on
the local side, the remote side is updated if a head of the same name the local side, the remote side is updated if a branch of the same name
already exists on the remote side. This is the default operation mode already exists on the remote side. This is the default operation mode
if no explicit refspec is found (that is neither on the command line 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). nor in any Push line of the corresponding remotes file---see below).