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

Re: Why git tags are there in git?

From
KKKonstantin Khomoutov <flatworm@users.sourceforge.net>
Date
Jan 28, 2011, 16:06 UTC
Message-ID
<20110128190628.f507599e.kostix@domain007.com>
In-Reply-To
<1296214676536-5969544.post@n2.nabble.com>

On Fri, 28 Jan 2011 03:37:56 -0800 (PST) vikram2rhyme <vikram2rhyme@gmail.com> wrote:

Show 7 quoted lines
> I am wondering why the tags are there in git. As they are just
> pointer to the commit
> we can refer those commit by SHA sum only then why tagging? Moreover a
> commit can
> be tagged more than once that result in multiple tags pointing to the
> same point in the history.
> Is this a design flaw?

Amending what other commenters said, I should note that beyond regular tags which just provide human-readable names to objects, there exist so-called "annotated tags" which are tags with descriptive messages contained in them, which can be used as a side-channel to provide additional information for commits, and also to digitally sign a line of history to which such a tag is attached.

Also note that a tag can be attached to any object in a Git database, not necessarily to a commit. This can be occasionally useful.

Previous: Gabriel FilionNext: Enrico Weigelt
Message 4 of 5 in “Why git tags are there in git?”
  1. vikram2rhymeJan 28, 2011
  2. L. Alberto GiménezJan 28, 2011
  3. Gabriel FilionJan 28, 2011
  4. Konstantin KhomoutovJan 28, 2011
  5. Enrico WeigeltJan 29, 2011

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.