# syntax for checking out specific tag on a remote

5 messages from 2007-08-12 to 2007-08-12. Participants: Jon Smirl, Junio C Hamano.
Thread: https://gitlist.dev/t/9499

## Jon Smirl, 2007-08-12 01:33

Subject: syntax for checking out specific tag on a remote
Message-ID: <9e4733910708111833r6588557al1876bd6aaae38204@mail.gmail.com>
URL: https://gitlist.dev/e/9e4733910708111833r6588557al1876bd6aaae38204%40mail.gmail.com

```
What's the syntax for checking out a specific tag on a remote?

I tried:
git checkout -b my19 linus/master/v2.6.19
git checkout linus/master/v2.6.19
git checkout linus/v2.6.19

jonsmirl@terra:/home/linux$ git remote show linus
* remote linus
  URL: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git


-- 
Jon Smirl
jonsmirl@gmail.com

```

## Junio C Hamano, 2007-08-12 01:41

Subject: Re: syntax for checking out specific tag on a remote
Message-ID: <7v1we9leb9.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v1we9leb9.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <9e4733910708111833r6588557al1876bd6aaae38204@mail.gmail.com>

```
"Jon Smirl" <jonsmirl@gmail.com> writes:

> What's the syntax for checking out a specific tag on a remote?

This depends on where you stored the tags you obtained from the
remote.  By default, "git fetch --tags" would store the tags in
a flat namespace; there is no "remote tag" namespace.

Hence you would say:

	git checkout v2.6.19

to get a detached HEAD at v2.6.19, or if you want to start a
branch from there,

	git checkout -b my19 v2.6.19

```

## Jon Smirl, 2007-08-12 01:50

Subject: Re: syntax for checking out specific tag on a remote
Message-ID: <9e4733910708111850v6e9669c3i536fba49f63d0f10@mail.gmail.com>
URL: https://gitlist.dev/e/9e4733910708111850v6e9669c3i536fba49f63d0f10%40mail.gmail.com
In-Reply-To: <7v1we9leb9.fsf@assigned-by-dhcp.cox.net>

```
On 8/11/07, Junio C Hamano <gitster@pobox.com> wrote:
> "Jon Smirl" <jonsmirl@gmail.com> writes:
>
> > What's the syntax for checking out a specific tag on a remote?
>
> This depends on where you stored the tags you obtained from the
> remote.  By default, "git fetch --tags" would store the tags in
> a flat namespace; there is no "remote tag" namespace.

I've been storing unrelated trees in the same git db. It never
occurred to me that there was a single tag name space. So if two of my
remotes both make a tag TEST then last one fetched will win? Are
"remote tag" namespaces planned for the future?


>
> Hence you would say:
>
>         git checkout v2.6.19
>
> to get a detached HEAD at v2.6.19, or if you want to start a
> branch from there,
>
>         git checkout -b my19 v2.6.19
>
>


-- 
Jon Smirl
jonsmirl@gmail.com

```

## Jon Smirl, 2007-08-12 01:57

Subject: Re: syntax for checking out specific tag on a remote
Message-ID: <9e4733910708111857h1ec88ed2t513064e3661ef49b@mail.gmail.com>
URL: https://gitlist.dev/e/9e4733910708111857h1ec88ed2t513064e3661ef49b%40mail.gmail.com
In-Reply-To: <9e4733910708111850v6e9669c3i536fba49f63d0f10@mail.gmail.com>

```
On 8/11/07, Jon Smirl <jonsmirl@gmail.com> wrote:
> On 8/11/07, Junio C Hamano <gitster@pobox.com> wrote:
> > "Jon Smirl" <jonsmirl@gmail.com> writes:
> >
> > > What's the syntax for checking out a specific tag on a remote?
> >
> > This depends on where you stored the tags you obtained from the
> > remote.  By default, "git fetch --tags" would store the tags in
> > a flat namespace; there is no "remote tag" namespace.
>
> I've been storing unrelated trees in the same git db. It never
> occurred to me that there was a single tag name space. So if two of my
> remotes both make a tag TEST then last one fetched will win? Are
> "remote tag" namespaces planned for the future?

This seems inconsistent to me. Remote heads have their own namespace
but remote tags don't.

-- 
Jon Smirl
jonsmirl@gmail.com

```

## Junio C Hamano, 2007-08-12 02:01

Subject: Re: syntax for checking out specific tag on a remote
Message-ID: <7vmywxjytj.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vmywxjytj.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <9e4733910708111850v6e9669c3i536fba49f63d0f10@mail.gmail.com>

```
"Jon Smirl" <jonsmirl@gmail.com> writes:

> On 8/11/07, Junio C Hamano <gitster@pobox.com> wrote:
>> "Jon Smirl" <jonsmirl@gmail.com> writes:
>>
>> > What's the syntax for checking out a specific tag on a remote?
>>
>> This depends on where you stored the tags you obtained from the
>> remote.  By default, "git fetch --tags" would store the tags in
>> a flat namespace; there is no "remote tag" namespace.
>
> I've been storing unrelated trees in the same git db. It never
> occurred to me that there was a single tag name space. So if two of my
> remotes both make a tag TEST then last one fetched will win? Are
> "remote tag" namespaces planned for the future?

There actually is no need to plan anything.

Typically people do not publish "private" tags to require such a
layout to differentiate tags from 47 different sources, so we
have never talked about this, but you can look into .git/config
file in your repository, and adjust [remote "foo"] fetch lines
to your specific taste.  e.g.

	[remote "a"]
        	fetch = +refs/heads/*:refs/remotes/a/*
                fetch = +refs/tags/*:refs/remote-tags/a/*

	[remote "b"]
        	fetch = +refs/heads/*:refs/remotes/b/*
                fetch = +refs/tags/*:refs/remote-tags/b/*

```
