Documentation: rework src/dst description in git push

This tries to make the description of ref matching in git push easier
to read. Beauty is in the eye of the beholder, though.

Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Anders Melchiorsen 2009-01-26 00:45:33 +01:00 committed by Junio C Hamano
parent 17507832ca
commit 803918462e

View File

@ -39,21 +39,22 @@ OPTIONS
It is used to specify with what <src> object the <dst> ref It is used to specify with what <src> object the <dst> ref
in the remote repository is to be updated. in the remote repository is to be updated.
+ +
The <src> side represents the source branch (or arbitrary The <src> is often the name of the branch you would want to push, but
"SHA1 expression", such as `master~4` (four parents before the it can be any arbitrary "SHA-1 expression", such as `master~4` or
tip of `master` branch); see linkgit:git-rev-parse[1]) that you `HEAD` (see linkgit:git-rev-parse[1]).
want to push. The <dst> side represents the destination location.
+ +
The local ref that matches <src> is used The <dst> tells which ref on the remote side is updated with this
to fast forward the remote ref that matches <dst>. If push. Arbitrary expressions cannot be used here, an actual ref must
the optional leading plus `+` is used, the remote ref is updated be named. If `:`<dst> is omitted, the same ref as <src> will be
even if it does not result in a fast forward update. updated.
+
The object referenced by <src> is used to fast forward the ref <dst>
on the remote side. If the optional leading plus `{plus}` is used, the
remote ref is updated 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 lonely <src> parameter (without a colon and a destination) pushes
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.
+ +