From: Anders Melchiorsen <mail@cup.kalibalik.dk>
To: gitster@pobox.com
Cc: git@vger.kernel.org, Anders Melchiorsen <mail@cup.kalibalik.dk>
Subject: [PATCH 2/3] Documentation: more git push examples
Date: Mon, 26 Jan 2009 00:45:32 +0100 [thread overview]
Message-ID: <1232927133-30377-3-git-send-email-mail@cup.kalibalik.dk> (raw)
In-Reply-To: <1232927133-30377-2-git-send-email-mail@cup.kalibalik.dk>
Include examples of using HEAD. The order of examples
introduces new concepts one by one. This pushes the
example of deleting a ref to the end of the list.
---
Documentation/git-push.txt | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 3fd4bbb..6d478c5 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -190,9 +190,9 @@ git push origin master::
with it. If `master` did not exist remotely, it would be
created.
-git push origin :experimental::
- Find a ref that matches `experimental` in the `origin` repository
- (e.g. `refs/heads/experimental`), and delete it.
+git push origin HEAD::
+ A handy way to push the current branch to the same name on the
+ remote.
git push origin master:satellite/master dev:satellite/dev::
Use the source ref that matches `master` (e.g. `refs/heads/master`)
@@ -200,6 +200,11 @@ git push origin master:satellite/master dev:satellite/dev::
`refs/remotes/satellite/master`) in the `origin` repository, then
do the same for `dev` and `satellite/dev`.
+git push origin HEAD:master::
+ Push the current branch to the remote ref matching `master` in the
+ `origin` repository. This form is convenient to push the current
+ branch without thinking about its local name.
+
git push origin master:refs/heads/experimental::
Create the branch `experimental` in the `origin` repository
by copying the current `master` branch. This form is only
@@ -207,6 +212,11 @@ git push origin master:refs/heads/experimental::
the local name and the remote name are different; otherwise,
the ref name on its own will work.
+git push origin :experimental::
+ Find a ref that matches `experimental` in the `origin` repository
+ (e.g. `refs/heads/experimental`), and delete it.
+
+
Author
------
Written by Junio C Hamano <gitster@pobox.com>, later rewritten in C
--
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 ` Anders Melchiorsen [this message]
2009-01-25 23:45 ` [PATCH 3/3] Documentation: rework src/dst description in git push Anders Melchiorsen
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-3-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).