{"thread":{"id":"49916","subject":"Git Tags","startedAt":"2018-11-29T11:50:19Z","lastAt":"2018-11-29T15:10:02Z","messageCount":5,"participants":["Stefanie Leisestreichler","Mateusz Loskot","Randall S. Becker","Ævar Arnfjörð Bjarmason"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"364305","messageId":"c8fc0da2-c3ff-4985-e4a2-a066a3a6f2af@peter-speer.de","threadId":"49916","inReplyTo":null,"subject":"Git Tags","fromName":"Stefanie Leisestreichler","fromEmail":"stefanie.leisestreichler@peter-speer.de","sentAt":"2018-11-29T11:11:31Z","receivedAt":"2018-11-29T11:50:19Z","isPatch":false,"sender":{"key":"stefanie.leisestreichler@peter-speer.de","avatar":null},"body":"Hi.\n\nI have done this (on box A):\n\ngit commit -m \"Message\"\ngit tag -a 0.9.0\ngit push origin master\n\nIn my local repository, when I run \"git tag\" it is showing me \"0.9.0\".\n\nThen I did (on box B)\ngit clone ssh://user@host:/path/project.git\ncd project\ngit tag\n\nNow git tag is showing nothing.\n\nWhy is the tag only available in my local repository?\n\nAlso when I try to\ngit clone --branch 0.9.0 ssh://user@host:/path/project.git\nit tells me: fatal:remote branch not found in upstream repository origin\n\nWhy is the tag not available in origin?\n\nThanks,\nStefanie\n\n"},{"id":"364306","messageId":"CABUeae_4yxtxFmi14+OivX-wFQq4Hd5uEV3_WhRMsMHbvSxy7w@mail.gmail.com","threadId":"49916","inReplyTo":"c8fc0da2-c3ff-4985-e4a2-a066a3a6f2af@peter-speer.de","subject":"Re: Git Tags","fromName":"Mateusz Loskot","fromEmail":"mateusz@loskot.net","sentAt":"2018-11-29T11:56:13Z","receivedAt":"2018-11-29T11:56:43Z","isPatch":false,"sender":{"key":"mateusz@loskot.net","avatar":"https://gravatar.com/avatar/fe5a0ce8995d4986f5c46aad6353e21717808da58e4bc710da1a100e247be239?d=mp&s=160"},"body":"On Thu, 29 Nov 2018 at 12:50, Stefanie Leisestreichler\n<stefanie.leisestreichler@peter-speer.de> wrote:\n>\n> git tag -a 0.9.0\n> git push origin master\n>\n> In my local repository, when I run \"git tag\" it is showing me \"0.9.0\".\n>\n> Then I did (on box B)\n> git clone ssh://user@host:/path/project.git\n> cd project\n> git tag\n>\n> Now git tag is showing nothing.\n>\n> Why is the tag only available in my local repository?\n\nFrom https://git-scm.com/book/en/v2/Git-Basics-Tagging\n\"By default, the git push command doesn’t transfer tags to remote servers.\nYou will have to explicitly push tags to a shared server after you\nhave created them.\"\n\nBest regards,\n-- \nMateusz Loskot, http://mateusz.loskot.net\n"},{"id":"364313","messageId":"001901d487e9$0f9e9d90$2edbd8b0$@nexbridge.com","threadId":"49916","inReplyTo":"CABUeae_4yxtxFmi14+OivX-wFQq4Hd5uEV3_WhRMsMHbvSxy7w@mail.gmail.com","subject":"RE: Git Tags","fromName":"Randall S. Becker","fromEmail":"rsbecker@nexbridge.com","sentAt":"2018-11-29T13:40:10Z","receivedAt":"2018-11-29T13:40:24Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On November 29, 2018 6:56, Mateusz Loskot wrote:\n> On Thu, 29 Nov 2018 at 12:50, Stefanie Leisestreichler\n> <stefanie.leisestreichler@peter-speer.de> wrote:\n> >\n> > git tag -a 0.9.0\n> > git push origin master\n> >\n> > In my local repository, when I run \"git tag\" it is showing me \"0.9.0\".\n> >\n> > Then I did (on box B)\n> > git clone ssh://user@host:/path/project.git cd project git tag\n> >\n> > Now git tag is showing nothing.\n> >\n> > Why is the tag only available in my local repository?\n> \n> >From https://git-scm.com/book/en/v2/Git-Basics-Tagging\n> \"By default, the git push command doesn’t transfer tags to remote servers.\n> You will have to explicitly push tags to a shared server after you have created\n> them.\"\n\ngit push --tags\n\nand\n\ngit fetch --tags\n\nto be symmetrical\n\nCheers,\nRandall\n\n-- Brief whoami:\n NonStop developer since approximately 211288444200000000\n UNIX developer since approximately 421664400\n-- In my real life, I talk too much.\n\n"},{"id":"364314","messageId":"CABUeae_jj1eqwgRNkC7R5GfLBhuKZjXYTBUJ5VgPyfLocFfJOA@mail.gmail.com","threadId":"49916","inReplyTo":"001901d487e9$0f9e9d90$2edbd8b0$@nexbridge.com","subject":"Re: Git Tags","fromName":"Mateusz Loskot","fromEmail":"mateusz@loskot.net","sentAt":"2018-11-29T13:45:10Z","receivedAt":"2018-11-29T13:45:40Z","isPatch":false,"sender":{"key":"mateusz@loskot.net","avatar":"https://gravatar.com/avatar/fe5a0ce8995d4986f5c46aad6353e21717808da58e4bc710da1a100e247be239?d=mp&s=160"},"body":"On Thu, 29 Nov 2018 at 14:40, Randall S. Becker <rsbecker@nexbridge.com> wrote:\n> On November 29, 2018 6:56, Mateusz Loskot wrote:\n> > On Thu, 29 Nov 2018 at 12:50, Stefanie Leisestreichler <stefanie.leisestreichler@peter-speer.de> wrote:\n> > >\n> > > git tag -a 0.9.0\n> > > git push origin master\n> > >\n> > > In my local repository, when I run \"git tag\" it is showing me \"0.9.0\".\n> > >\n> > > Then I did (on box B)\n> > > git clone ssh://user@host:/path/project.git cd project git tag\n> > >\n> > > Now git tag is showing nothing.\n> > >\n> > > Why is the tag only available in my local repository?\n> >\n> > >From https://git-scm.com/book/en/v2/Git-Basics-Tagging\n> > \"By default, the git push command doesn’t transfer tags to remote servers.\n> > You will have to explicitly push tags to a shared server after you have created\n> > them.\"\n>\n> git push --tags\n>\n\nAfter my yesterday experience [1], I'd be careful with git push --tags :)\n\n[1] genuine screenshot and link to related thread at\nhttps://twitter.com/mloskot/status/1068072285846859776\n\nBest regards,\n-- \nMateusz Loskot, http://mateusz.loskot.net\n"},{"id":"364331","messageId":"87woovyl6i.fsf@evledraar.gmail.com","threadId":"49916","inReplyTo":"c8fc0da2-c3ff-4985-e4a2-a066a3a6f2af@peter-speer.de","subject":"Re: Git Tags","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2018-11-29T15:09:57Z","receivedAt":"2018-11-29T15:10:02Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Thu, Nov 29 2018, Stefanie Leisestreichler wrote:\n\n> Hi.\n>\n> I have done this (on box A):\n>\n> git commit -m \"Message\"\n> git tag -a 0.9.0\n> git push origin master\n>\n> In my local repository, when I run \"git tag\" it is showing me \"0.9.0\".\n>\n> Then I did (on box B)\n> git clone ssh://user@host:/path/project.git\n> cd project\n> git tag\n>\n> Now git tag is showing nothing.\n>\n> Why is the tag only available in my local repository?\n>\n> Also when I try to\n> git clone --branch 0.9.0 ssh://user@host:/path/project.git\n> it tells me: fatal:remote branch not found in upstream repository origin\n\nBecause --branch <name> means get refs/heads/<name>, tags are not\nbranches. However, because we're apparently quite loose about this in\nthe clone/fetch code this does give you the tag if it exists, but\nprobably not in the way you expect.\n\nWe interpret the argument as a branch, and will get not only this tag\nbut \"follow\" (see --no-tags in git-fetch(1)) the tag as though it were a\nbranch and give you all tags leading up to that one. This would give you\na single tag:\n\n    git clone --no-tags --branch v2.19.0 --single-branch https://github.com/git/git.git\n\nBut this is a more direct way to do it:\n\n    git init git; git -C git fetch --no-tags https://github.com/git/git.git tag v2.19.0\n\nWhich'll since you said it failed that's because you haven't pushed the\ntag. Try 'git ls-remote <url>' to see if it's there (it's not).\n"}]}