{"thread":{"id":"9499","subject":"syntax for checking out specific tag on a remote","startedAt":"2007-08-12T01:33:02Z","lastAt":"2007-08-12T02:01:28Z","messageCount":5,"participants":["Jon Smirl","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"50526","messageId":"9e4733910708111833r6588557al1876bd6aaae38204@mail.gmail.com","threadId":"9499","inReplyTo":null,"subject":"syntax for checking out specific tag on a remote","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2007-08-12T01:33:02Z","receivedAt":"2007-08-12T01:33:02Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"What's the syntax for checking out a specific tag on a remote?\n\nI tried:\ngit checkout -b my19 linus/master/v2.6.19\ngit checkout linus/master/v2.6.19\ngit checkout linus/v2.6.19\n\njonsmirl@terra:/home/linux$ git remote show linus\n* remote linus\n  URL: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git\n\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"50528","messageId":"7v1we9leb9.fsf@assigned-by-dhcp.cox.net","threadId":"9499","inReplyTo":"9e4733910708111833r6588557al1876bd6aaae38204@mail.gmail.com","subject":"Re: syntax for checking out specific tag on a remote","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-12T01:41:30Z","receivedAt":"2007-08-12T01:41:30Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Jon Smirl\" <jonsmirl@gmail.com> writes:\n\n> What's the syntax for checking out a specific tag on a remote?\n\nThis depends on where you stored the tags you obtained from the\nremote.  By default, \"git fetch --tags\" would store the tags in\na flat namespace; there is no \"remote tag\" namespace.\n\nHence you would say:\n\n\tgit checkout v2.6.19\n\nto get a detached HEAD at v2.6.19, or if you want to start a\nbranch from there,\n\n\tgit checkout -b my19 v2.6.19\n"},{"id":"50529","messageId":"9e4733910708111850v6e9669c3i536fba49f63d0f10@mail.gmail.com","threadId":"9499","inReplyTo":"7v1we9leb9.fsf@assigned-by-dhcp.cox.net","subject":"Re: syntax for checking out specific tag on a remote","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2007-08-12T01:50:10Z","receivedAt":"2007-08-12T01:50:10Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"On 8/11/07, Junio C Hamano <gitster@pobox.com> wrote:\n> \"Jon Smirl\" <jonsmirl@gmail.com> writes:\n>\n> > What's the syntax for checking out a specific tag on a remote?\n>\n> This depends on where you stored the tags you obtained from the\n> remote.  By default, \"git fetch --tags\" would store the tags in\n> a flat namespace; there is no \"remote tag\" namespace.\n\nI've been storing unrelated trees in the same git db. It never\noccurred to me that there was a single tag name space. So if two of my\nremotes both make a tag TEST then last one fetched will win? Are\n\"remote tag\" namespaces planned for the future?\n\n\n>\n> Hence you would say:\n>\n>         git checkout v2.6.19\n>\n> to get a detached HEAD at v2.6.19, or if you want to start a\n> branch from there,\n>\n>         git checkout -b my19 v2.6.19\n>\n>\n\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"50532","messageId":"9e4733910708111857h1ec88ed2t513064e3661ef49b@mail.gmail.com","threadId":"9499","inReplyTo":"9e4733910708111850v6e9669c3i536fba49f63d0f10@mail.gmail.com","subject":"Re: syntax for checking out specific tag on a remote","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2007-08-12T01:57:34Z","receivedAt":"2007-08-12T01:57:34Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"On 8/11/07, Jon Smirl <jonsmirl@gmail.com> wrote:\n> On 8/11/07, Junio C Hamano <gitster@pobox.com> wrote:\n> > \"Jon Smirl\" <jonsmirl@gmail.com> writes:\n> >\n> > > What's the syntax for checking out a specific tag on a remote?\n> >\n> > This depends on where you stored the tags you obtained from the\n> > remote.  By default, \"git fetch --tags\" would store the tags in\n> > a flat namespace; there is no \"remote tag\" namespace.\n>\n> I've been storing unrelated trees in the same git db. It never\n> occurred to me that there was a single tag name space. So if two of my\n> remotes both make a tag TEST then last one fetched will win? Are\n> \"remote tag\" namespaces planned for the future?\n\nThis seems inconsistent to me. Remote heads have their own namespace\nbut remote tags don't.\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"50533","messageId":"7vmywxjytj.fsf@assigned-by-dhcp.cox.net","threadId":"9499","inReplyTo":"9e4733910708111850v6e9669c3i536fba49f63d0f10@mail.gmail.com","subject":"Re: syntax for checking out specific tag on a remote","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-12T02:01:28Z","receivedAt":"2007-08-12T02:01:28Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Jon Smirl\" <jonsmirl@gmail.com> writes:\n\n> On 8/11/07, Junio C Hamano <gitster@pobox.com> wrote:\n>> \"Jon Smirl\" <jonsmirl@gmail.com> writes:\n>>\n>> > What's the syntax for checking out a specific tag on a remote?\n>>\n>> This depends on where you stored the tags you obtained from the\n>> remote.  By default, \"git fetch --tags\" would store the tags in\n>> a flat namespace; there is no \"remote tag\" namespace.\n>\n> I've been storing unrelated trees in the same git db. It never\n> occurred to me that there was a single tag name space. So if two of my\n> remotes both make a tag TEST then last one fetched will win? Are\n> \"remote tag\" namespaces planned for the future?\n\nThere actually is no need to plan anything.\n\nTypically people do not publish \"private\" tags to require such a\nlayout to differentiate tags from 47 different sources, so we\nhave never talked about this, but you can look into .git/config\nfile in your repository, and adjust [remote \"foo\"] fetch lines\nto your specific taste.  e.g.\n\n\t[remote \"a\"]\n        \tfetch = +refs/heads/*:refs/remotes/a/*\n                fetch = +refs/tags/*:refs/remote-tags/a/*\n\n\t[remote \"b\"]\n        \tfetch = +refs/heads/*:refs/remotes/b/*\n                fetch = +refs/tags/*:refs/remote-tags/b/*\n"}]}