Skip to content

Commit 664a334

Browse files
committed
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
2 parents 0aac161 + 69274b6 commit 664a334

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Documentation/git-push.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ OPTIONS
2828
-------
2929
<repository>::
3030
The "remote" repository that is destination of a push
31-
operation. See the section <<URLS,GIT URLS>> below.
31+
operation. This parameter can be either a URL
32+
(see the section <<URLS,GIT URLS>> below) or the name
33+
of a remote (see the section <<REMOTES,REMOTES>> below).
3234

3335
<refspec>...::
3436
The canonical format of a <refspec> parameter is
@@ -42,22 +44,21 @@ tip of `master` branch); see linkgit:git-rev-parse[1]) that you
4244
want to push. The <dst> side represents the destination location.
4345
+
4446
The local ref that matches <src> is used
45-
to fast forward the remote ref that matches <dst> (or, if no <dst> was
46-
specified, the same ref that <src> referred to locally). If
47+
to fast forward the remote ref that matches <dst>. If
4748
the optional leading plus `+` is used, the remote ref is updated
4849
even if it does not result in a fast forward update.
4950
+
5051
`tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`.
5152
+
52-
A parameter <ref> without a colon pushes the <ref> from the source
53-
repository to the destination repository under the same name.
53+
A lonely <src> parameter (without a colon and a destination) pushes
54+
the <src> to the same name in the destination repository.
5455
+
5556
Pushing an empty <src> allows you to delete the <dst> ref from
5657
the remote repository.
5758
+
5859
The special refspec `:` (or `+:` to allow non-fast forward updates)
59-
directs git to push "matching" heads: for every head that exists on
60-
the local side, the remote side is updated if a head of the same name
60+
directs git to push "matching" branches: for every branch that exists on
61+
the local side, the remote side is updated if a branch of the same name
6162
already exists on the remote side. This is the default operation mode
6263
if no explicit refspec is found (that is neither on the command line
6364
nor in any Push line of the corresponding remotes file---see below).

0 commit comments

Comments
 (0)