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

git tag -a HEAD leads to ambiguous branch name

From
Ggit@jowil.de <git@jowil.de>
Date
Nov 27, 2024, 00:14 UTC
Message-ID
<47cdf937-6192-4c83-a0e5-700e98f36c1e@jowil.de>

Good evening, today I encountered a warning using  git version 2.39.0.windows.2: /warning: refname 'HEAD' is ambiguous./ It turned out, having written /git tag -a HEAD -m "Some message."/ was the culprit. As /git branch HEAD/ yields the following error /fatal: 'HEAD' is not a valid branch name/ I wanted to aks, whether a similar check should  be applied to tag names. Best regards Johannes Wilde

Next: Jeff King
Message 1 of 5 in “git tag -a HEAD leads to ambiguous branch name”
  1. git@jowil.deNov 27, 2024
  2. Jeff KingNov 27, 2024
  3. Junio C HamanoNov 27, 2024
  4. Jeff KingDec 1, 2024
  5. Junio C HamanoDec 2, 2024

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.