{"thread":{"id":"21366","subject":"git push interface inconsistency","startedAt":"2009-10-26T22:25:07Z","lastAt":"2009-10-26T23:39:32Z","messageCount":3,"participants":["Eugene Sajine","Avery Pennarun"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"125959","messageId":"76c5b8580910261525y5397b54eyf9c3d58c0fe19fce@mail.gmail.com","threadId":"21366","inReplyTo":null,"subject":"git push interface inconsistency","fromName":"Eugene Sajine","fromEmail":"euguess@gmail.com","sentAt":"2009-10-26T22:25:07Z","receivedAt":"2009-10-26T22:25:07Z","isPatch":false,"sender":{"key":"euguess@gmail.com","avatar":null},"body":"Hi,\n\nI have a question:\n\nWhy I can't do\n\n$ git push my_tag\n\nIt will fail because the remote is not specified, even if there is\nonly one origin remote\n\nbut can do\n\n$ git push --tags\n\nand it will push tags to origin...\n\nThanks,\nEugene\n"},{"id":"125961","messageId":"32541b130910261531o36b8ce7eh6bddf26a2ae15663@mail.gmail.com","threadId":"21366","inReplyTo":"76c5b8580910261525y5397b54eyf9c3d58c0fe19fce@mail.gmail.com","subject":"Re: git push interface inconsistency","fromName":"Avery Pennarun","fromEmail":"apenwarr@gmail.com","sentAt":"2009-10-26T22:31:44Z","receivedAt":"2009-10-26T22:31:44Z","isPatch":false,"sender":{"key":"apenwarr@gmail.com","avatar":"https://avatars.githubusercontent.com/u/20592?v=4"},"body":"On Mon, Oct 26, 2009 at 6:25 PM, Eugene Sajine <euguess@gmail.com> wrote:\n> I have a question:\n>\n> Why I can't do\n>\n> $ git push my_tag\n>\n> It will fail because the remote is not specified, even if there is\n> only one origin remote\n>\n> but can do\n>\n> $ git push --tags\n>\n> and it will push tags to origin...\n\nBecause 'my_tag' is interpreted as the name or URL of the remote, not\nas a branch name.  You can do \"git push origin\" and it will guess the\nbranch name(s) to push, but because of that, the one-parameter push\ncan't *also* be used to guess the remote name.\n\nIn contrast, --tags is a flag, so it's actually the zero-parameter\nversion of push, which assumes 'origin' and then guesses the branch\nname (and --tags changes the guessed result).\n\nHope that helps.\n\nHave fun,\n\nAvery\n"},{"id":"125964","messageId":"76c5b8580910261639p374c6391h3ae39bf4512c2f10@mail.gmail.com","threadId":"21366","inReplyTo":"32541b130910261531o36b8ce7eh6bddf26a2ae15663@mail.gmail.com","subject":"Re: git push interface inconsistency","fromName":"Eugene Sajine","fromEmail":"euguess@gmail.com","sentAt":"2009-10-26T23:39:32Z","receivedAt":"2009-10-26T23:39:32Z","isPatch":false,"sender":{"key":"euguess@gmail.com","avatar":null},"body":"Got it.\n\n\nThanks!\n\nOn Mon, Oct 26, 2009 at 6:31 PM, Avery Pennarun <apenwarr@gmail.com> wrote:\n> On Mon, Oct 26, 2009 at 6:25 PM, Eugene Sajine <euguess@gmail.com> wrote:\n>> I have a question:\n>>\n>> Why I can't do\n>>\n>> $ git push my_tag\n>>\n>> It will fail because the remote is not specified, even if there is\n>> only one origin remote\n>>\n>> but can do\n>>\n>> $ git push --tags\n>>\n>> and it will push tags to origin...\n>\n> Because 'my_tag' is interpreted as the name or URL of the remote, not\n> as a branch name.  You can do \"git push origin\" and it will guess the\n> branch name(s) to push, but because of that, the one-parameter push\n> can't *also* be used to guess the remote name.\n>\n> In contrast, --tags is a flag, so it's actually the zero-parameter\n> version of push, which assumes 'origin' and then guesses the branch\n> name (and --tags changes the guessed result).\n>\n> Hope that helps.\n>\n> Have fun,\n>\n> Avery\n>\n"}]}