* git push interface inconsistency
@ 2009-10-26 22:25 Eugene Sajine
2009-10-26 22:31 ` Avery Pennarun
0 siblings, 1 reply; 3+ messages in thread
From: Eugene Sajine @ 2009-10-26 22:25 UTC (permalink / raw)
To: git; +Cc: Eugene Sajine
Hi,
I have a question:
Why I can't do
$ git push my_tag
It will fail because the remote is not specified, even if there is
only one origin remote
but can do
$ git push --tags
and it will push tags to origin...
Thanks,
Eugene
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git push interface inconsistency
2009-10-26 22:25 git push interface inconsistency Eugene Sajine
@ 2009-10-26 22:31 ` Avery Pennarun
2009-10-26 23:39 ` Eugene Sajine
0 siblings, 1 reply; 3+ messages in thread
From: Avery Pennarun @ 2009-10-26 22:31 UTC (permalink / raw)
To: Eugene Sajine; +Cc: git
On Mon, Oct 26, 2009 at 6:25 PM, Eugene Sajine <euguess@gmail.com> wrote:
> I have a question:
>
> Why I can't do
>
> $ git push my_tag
>
> It will fail because the remote is not specified, even if there is
> only one origin remote
>
> but can do
>
> $ git push --tags
>
> and it will push tags to origin...
Because 'my_tag' is interpreted as the name or URL of the remote, not
as a branch name. You can do "git push origin" and it will guess the
branch name(s) to push, but because of that, the one-parameter push
can't *also* be used to guess the remote name.
In contrast, --tags is a flag, so it's actually the zero-parameter
version of push, which assumes 'origin' and then guesses the branch
name (and --tags changes the guessed result).
Hope that helps.
Have fun,
Avery
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git push interface inconsistency
2009-10-26 22:31 ` Avery Pennarun
@ 2009-10-26 23:39 ` Eugene Sajine
0 siblings, 0 replies; 3+ messages in thread
From: Eugene Sajine @ 2009-10-26 23:39 UTC (permalink / raw)
To: Avery Pennarun; +Cc: git
Got it.
Thanks!
On Mon, Oct 26, 2009 at 6:31 PM, Avery Pennarun <apenwarr@gmail.com> wrote:
> On Mon, Oct 26, 2009 at 6:25 PM, Eugene Sajine <euguess@gmail.com> wrote:
>> I have a question:
>>
>> Why I can't do
>>
>> $ git push my_tag
>>
>> It will fail because the remote is not specified, even if there is
>> only one origin remote
>>
>> but can do
>>
>> $ git push --tags
>>
>> and it will push tags to origin...
>
> Because 'my_tag' is interpreted as the name or URL of the remote, not
> as a branch name. You can do "git push origin" and it will guess the
> branch name(s) to push, but because of that, the one-parameter push
> can't *also* be used to guess the remote name.
>
> In contrast, --tags is a flag, so it's actually the zero-parameter
> version of push, which assumes 'origin' and then guesses the branch
> name (and --tags changes the guessed result).
>
> Hope that helps.
>
> Have fun,
>
> Avery
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-10-26 23:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-26 22:25 git push interface inconsistency Eugene Sajine
2009-10-26 22:31 ` Avery Pennarun
2009-10-26 23:39 ` Eugene Sajine
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).