From: Anders Melchiorsen <mail@cup.kalibalik.dk>
To: gitster@pobox.com
Cc: git@vger.kernel.org, Anders Melchiorsen <mail@cup.kalibalik.dk>
Subject: [PATCH 3/3] Documentation: rework src/dst description in git push
Date: Mon, 26 Jan 2009 00:45:33 +0100 [thread overview]
Message-ID: <1232927133-30377-4-git-send-email-mail@cup.kalibalik.dk> (raw)
In-Reply-To: <1232927133-30377-3-git-send-email-mail@cup.kalibalik.dk>
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>
---
This is a followup to
http://article.gmane.org/gmane.comp.version-control.git/99553/
Documentation/git-push.txt | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 6d478c5..1b3de4f 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -38,20 +38,21 @@ OPTIONS
by a colon `:`, followed by the destination ref <dst>.
Find various forms of refspecs in examples section.
+
-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.
--
1.6.0.2.514.g23abd3
next prev parent reply other threads:[~2009-01-25 23:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-25 23:45 [PATCH 0/3] Documentation: refine refspec description Anders Melchiorsen
2009-01-25 23:45 ` [PATCH 1/3] Documentation: simplify refspec format description Anders Melchiorsen
2009-01-25 23:45 ` [PATCH 2/3] Documentation: more git push examples Anders Melchiorsen
2009-01-25 23:45 ` Anders Melchiorsen [this message]
2009-01-26 6:24 ` [PATCH 1/3] Documentation: simplify refspec format description Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1232927133-30377-4-git-send-email-mail@cup.kalibalik.dk \
--to=mail@cup.kalibalik.dk \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).