summaryrefslogtreecommitdiff
path: root/Documentation/git-push.txt
diff options
context:
space:
mode:
authorAnders Melchiorsen <mail@cup.kalibalik.dk>2009-01-26 00:45:33 +0100
committerJunio C Hamano <gitster@pobox.com>2009-01-25 22:26:43 -0800
commit803918462e58005d18c0ab63686dbd9e91330dfe (patch)
tree89458e2019b1b13518b762da8d1ad7df4ffc0d2b /Documentation/git-push.txt
parent17507832ca9a5e54e2b65a5e1ad2d17255f1b925 (diff)
downloadgit-803918462e58005d18c0ab63686dbd9e91330dfe.tar.gz
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>
Diffstat (limited to 'Documentation/git-push.txt')
-rw-r--r--Documentation/git-push.txt23
1 files changed, 12 insertions, 11 deletions
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 60de47d439..7d1eced7d2 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -39,20 +39,21 @@ OPTIONS
It is used to specify with what <src> object the <dst> ref
in the remote repository is to be updated.
+
-The <src> side represents the source branch (or arbitrary
-"SHA1 expression", such as `master~4` (four parents before the
-tip of `master` branch); see linkgit:git-rev-parse[1]) that you
-want to push. The <dst> side represents the destination location.
+The <src> is often the name of the branch you would want to push, but
+it can be any arbitrary "SHA-1 expression", such as `master~4` or
+`HEAD` (see linkgit:git-rev-parse[1]).
+
-The local ref that matches <src> is used
-to fast forward the remote ref that matches <dst>. If
-the optional leading plus `+` is used, the remote ref is updated
-even if it does not result in a fast forward update.
+The <dst> tells which ref on the remote side is updated with this
+push. Arbitrary expressions cannot be used here, an actual ref must
+be named. If `:`<dst> is omitted, the same ref as <src> will be
+updated.
+
-`tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`.
+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.
+
-A lonely <src> parameter (without a colon and a destination) pushes
-the <src> to the same name in the destination repository.
+`tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`.
+
Pushing an empty <src> allows you to delete the <dst> ref from
the remote repository.