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

Re: How to checkout a tag?

From
Llinux@horizon.com <linux@horizon.com>
Date
Oct 5, 2006, 12:00 UTC
Message-ID
<20061005120037.16181.qmail@science.horizon.com>
> A tag is a ref like any other:
> 
> 	git checkout -b branchname tag

For some operations, "git pull" in particular, I need to include a "tags/" prefix. E.g.

$ git fetch
remote: Generating pack...
remote: Done counting 27780 objects.
remote: Result has 22237 objects.
remote: Deltifying 22237 objects.
remote:  100% (22237/22237) done
Unpacking 22237 objects
remote: Total 22237, written 22237 (delta 18295), reused 17624 (delta 14183)
 100% (22237/22237) done
* refs/heads/origin: fast forward to branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
  from a77c64c1a641950626181b4857abb701d8f38ccc to d223a60106891bfe46febfacf46b20cd8509aaad
Auto-following refs/tags/v2.6.19-rc1
remote: Generating pack...
remote: Done counting 1 objects.
remote: Deltifying 1 objects.
remote:  100% (1/1) done
remote: Total 1, written 1 (delta 0), reused 1 (delta 0)
Unpacking 1 objects
 100% (1/1) done
* refs/tags/v2.6.19-rc1: storing tag 'v2.6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6

$ git pull . v2.6.19-rc1 error: no such remote ref refs/heads/v2.6.19-rc1 Fetch failure: .

$ git pull -n . tags/v2.6.19-rc1
Updating from e478bec0ba0a83a48a0f6982934b6de079e7e6b3 to d223a60106891bfe46febfacf46b20cd8509aaad
Checking files out...
Checking files out...
 100% (6590/6590) done
Fast forward
Message 1 of 1 in “Re: How to checkout a tag?”
  1. linux@horizon.comOct 5, 2006

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.