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

Proper way to checkout a tag?

From
Dun Peal <dunpealer@gmail.com>
Date
Dec 1, 2010, 19:38 UTC
Message-ID
<AANLkTi=b12n0J+Qg4S7i9dnbMHoWvPS3OXP0CDZevT_4@mail.gmail.com>

Hi. We tag our releases with names like "release-0", "release-1" and so forth. Tags (lightweight ones) seem like the perfect markers for these releases since we want a reference that can't ever change (as opposed to a head).

The problem is that since there's no head pointing to each release, if our users just:

$ git checkout release-1

When they want to build that release, they get into a detached HEAD state. I've always construed detached HEAD as a non-standard state, and it doesn't seem proper to reach it regularly in the course of a standard operation like checking out past releases.

It's particularly confusing for our users who are new to Git.
Any thoughts, or alternative methods to do this?
Thanks, D
Next: Jonathan Nieder
Message 1 of 4 in “Proper way to checkout a tag?”
  1. Dun PealDec 1, 2010
  2. Jonathan NiederDec 1, 2010
  3. Dun PealDec 1, 2010
  4. Michael J GruberDec 2, 2010

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.