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

Re: git checkout does not warn about tags without corresponding commits

From
Miklos Vajna <vmiklos@frugalware.org>
Date
Jan 2, 2009, 15:04 UTC
Message-ID
<20090102150437.GN21154@genesis.frugalware.org>
In-Reply-To
<200901021325.58049.henrik@austad.us>
On Fri, Jan 02, 2009 at 01:25:57PM +0100, Henrik Austad <henrik@austad.us> wrote:
> I can see that there's no commit for this, but, when there's a tag. I thought 
> that a tag was just a commit-sha1 with a name attached, along with some tag 
> info and a signature. Can you really create a tag without a commit?

Sure, you can tag any object type (blob, tree, commit or tag), but usually only commits are tagged.

See for example the 'junio-gpg-pub' tag in git.git which tags a blob.
Previous: Henrik AustadNext: Junio C Hamano
Message 2 of 8 in “git checkout does not warn about tags without corresponding commits”
  1. Henrik AustadJan 2, 2009
  2. Miklos VajnaJan 2, 2009
  3. Junio C HamanoJan 2, 2009
  4. Henrik AustadJan 3, 2009
  5. Junio C HamanoJan 3, 2009
  6. Junio C HamanoJan 3, 2009
  7. Henrik AustadJan 3, 2009
  8. Daniel BarkalowJan 3, 2009

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.