git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jari Aalto <jari.aalto@cante.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Mention that 'push .. master' is in explicit form master:refs/heads/master
Date: Tue, 18 Sep 2007 13:54:26 -0700	[thread overview]
Message-ID: <7vfy1bvgn1.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <wsuomgyu.fsf@blue.sea.net> (Jari Aalto's message of "Tue, 18 Sep 2007 12:59:53 +0300")

Jari Aalto <jari.aalto@cante.net> writes:

> Signed-off-by: Jari Aalto <jari.aalto AT cante.net>
> ---
>  Documentation/git-push.txt |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
> index 7b8e075..71ac450 100644
> --- a/Documentation/git-push.txt
> +++ b/Documentation/git-push.txt
> @@ -105,7 +105,9 @@ git push origin master::
>  	Find a ref that matches `master` in the source repository
>  	(most likely, it would find `refs/heads/master`), and update
>  	the same ref (e.g. `refs/heads/master`) in `origin` repository
> -	with it.
> +	with it. The following would be exactly same command:
> +
> +	git push origin master:refs/heads/master

They _might_ be exactly the same.

The reason people often explicitly write

	$ git push $URL refs/heads/master:refs/heads/master

in their insns for newbies is because this form would not be
affected by the random factors at $URL repository (or your
repository) and will consistently get the same result.

	$ git push $URL foo

may push branch head 'foo' or tag 'foo' depending on which one
you have locally.  Having both is not encouraged, but spelling
the insn out explicitly as refs/heads/foo makes it clear the
command is talking about the branch even when there is a tag
with the same name.

  parent reply	other threads:[~2007-09-18 20:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-18  9:59 [PATCH] Mention that 'push .. master' is in explicit form master:refs/heads/master Jari Aalto
2007-09-18 12:01 ` Johannes Schindelin
2007-09-18 20:54 ` Junio C Hamano [this message]
2007-09-19 10:37   ` Jari Aalto

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vfy1bvgn1.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jari.aalto@cante.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).