All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jari Aalto <jari.aalto@cante.net>
To: git@vger.kernel.org
Subject: Re: [PATCH] Mention that 'push .. master' is in explicit form master:refs/heads/master
Date: Wed, 19 Sep 2007 13:37:41 +0300	[thread overview]
Message-ID: <bqbzj5ze.fsf@blue.sea.net> (raw)
In-Reply-To: 7vfy1bvgn1.fsf@gitster.siamese.dyndns.org

* Tue 2007-09-18 Junio C Hamano <gitster AT pobox.com>
* Message-Id: 7vfy1bvgn1.fsf AT gitster.siamese.dyndns.org
>>  	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.

Thank you, kindly broaden the current documentation to include this
explanation.

Jari

-- 
Welcome to FOSS revolution: we fix and modify until it shines

      reply	other threads:[~2007-09-19 10:38 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
2007-09-19 10:37   ` Jari Aalto [this message]

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=bqbzj5ze.fsf@blue.sea.net \
    --to=jari.aalto@cante.net \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.