git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git push interface inconsistency

From
ESEugene Sajine <euguess@gmail.com>
Date
Oct 26, 2009, 23:39 UTC
Message-ID
<76c5b8580910261639p374c6391h3ae39bf4512c2f10@mail.gmail.com>
In-Reply-To
<32541b130910261531o36b8ce7eh6bddf26a2ae15663@mail.gmail.com>
Got it.
Thanks!
On Mon, Oct 26, 2009 at 6:31 PM, Avery Pennarun <apenwarr@gmail.com> wrote:
Show 31 quoted lines
> 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
>
Previous: Avery Pennarun
Message 3 of 3 in “git push interface inconsistency”
  1. Eugene SajineOct 26, 2009
  2. Avery PennarunOct 26, 2009
  3. Eugene SajineOct 26, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.