# gti push interface inconsistency

3 messages from 2009-10-26 to 2009-10-27. Participants: Eugene Sajine, Junio C Hamano.
Thread: https://gitlist.dev/t/21365

## Eugene Sajine, 2009-10-26 22:23

Subject: gti push interface inconsistency
Message-ID: <76c5b8580910261523s51ac22b5y624ec3502e8fed67@mail.gmail.com>
URL: https://gitlist.dev/e/76c5b8580910261523s51ac22b5y624ec3502e8fed67%40mail.gmail.com

```
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

```

## Junio C Hamano, 2009-10-27 00:08

Subject: Re: gti push interface inconsistency
Message-ID: <7veiopd7gs.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7veiopd7gs.fsf%40alter.siamese.dyndns.org
In-Reply-To: <76c5b8580910261523s51ac22b5y624ec3502e8fed67@mail.gmail.com>

```
Eugene Sajine <euguess@gmail.com> writes:

> 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

Probably because git is not smart enough to understand the human language
to notice 't' 'a' 'g' is a tag and cannot be a remote name spelled
incorrectly, or git cannot read your mind and find out that you spelled
a name of the remote correctly but forgot to add the remote first.

```

## Eugene Sajine, 2009-10-27 04:47

Subject: Re: gti push interface inconsistency
Message-ID: <76c5b8580910262147w4e3ef7a9k8b65f586e893f4fd@mail.gmail.com>
URL: https://gitlist.dev/e/76c5b8580910262147w4e3ef7a9k8b65f586e893f4fd%40mail.gmail.com
In-Reply-To: <7veiopd7gs.fsf@alter.siamese.dyndns.org>

```
>
> Probably because git is not smart enough to understand the human language
> to notice 't' 'a' 'g' is a tag and cannot be a remote name spelled
> incorrectly, or git cannot read your mind and find out that you spelled
> a name of the remote correctly but forgot to add the remote first.
>

;)
did you mean It is not smart enough yet?

My question was caused only by the fact that in both situations same
object type is transmitted to the origin repo. As understand that it
was done this way  in order to avoid specifying keys for remote...
I.e. "git push origin master" is kinda easier then something like "git
push -r origin master" (-r for remote).
But if for "git push --tags" the remote is not important (uses origin
by default) why it is important for "git push my_tag" or for "git push
origin master"?

Do you think

$ git push master

Which would default to origin have a chance to exist? (I would vote for this)
Or the correct aproach is to have

$ git push origin --tags

IMHO, In any case the push operation interface should be consistent.
Else it is a bit confusing (untill you didn't step on it and didn't
learn the difference).

Best regards,
Eugene

```
