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

[BUG]: git checkout on a new tag with current HEAD shows "head detached" at previous tag

From
DKDani Koretsky <dani@cybereason.com>
Date
Feb 5, 2019, 09:19 UTC
Message-ID
<CANcfovV3Pq3pubtNq4HCSZOJ5OC9dVSm+19VkOiQimAH+fttYw@mail.gmail.com>

I have 2 tags such as release-17.6.230 and release-17.6.220: If I'm changing commits, all works as expected.

If however both are pointing to the same commit, the output is as follows:

git checkout release-17.6.220 git status HEAD detached at release-17.6.220

now if I run: git checkout release-17.6.230 git status HEAD detached at release-17.6.220

Which is theoretically correct, but I'd expect after checking out a certain tag I'd be see that specific tag...

Sorry if this is intended behavior, I couldn't find clear mention of this behavior on the git checkout documentation online..

Let me know if I can help in anyway.

Cheers, Dani Koretsky - Researcher

Next: Randall S. Becker
Message 1 of 4 in “[BUG]: git checkout on a new tag with current HEAD shows "head detached" at previous tag”
  1. Dani KoretskyFeb 5, 2019
  2. Randall S. BeckerFeb 5, 2019
  3. Ævar Arnfjörð BjarmasonFeb 5, 2019
  4. Ævar Arnfjörð BjarmasonFeb 5, 2019

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.