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

Re: meaning of "-g" in git-describe output

From
Jay Soffian <jaysoffian@gmail.com>
Date
Mar 17, 2010, 23:14 UTC
Message-ID
<76718491003171614r2e8ce0e5r3e4799503194831c@mail.gmail.com>
In-Reply-To
<201003172320.45058.markus.heidelberg@web.de>

On Wed, Mar 17, 2010 at 6:20 PM, Markus Heidelberg <markus.heidelberg@web.de> wrote:

Show 5 quoted lines
> Hello,
>
> what is the meaning of the character 'g' in output like v1.0.4-14-g2414721 ?
> Is it simply the first letter, which isn't used in hexadecimal numbers
> or has it a deeper sense?

My guess, from 908e531 (Add a "git-describe" command, 2005-12-24), is that it's short for "git":

    IOW, with something like Junios current tree, I get:
        [torvalds@g5 git]$ git-describe parent
        refs/tags/v1.0.4-g2414721b
    ie the current head of my "parent" branch (ie Junio) is based on v1.0.4,
    but since it has a few commits on top of that, it has added the git hash
    of the thing to the end: "-g" + 8-char shorthand for the commit
    2414721b194453f058079d897d13c4e377f92dc6.
    -- http://marc.info/?t=113546113600001
But I think only Linus (+cc) knows. :-)
j.
Previous: Markus HeidelbergNext: Linus Torvalds
Message 2 of 4 in “meaning of "-g" in git-describe output”
  1. Markus HeidelbergMar 17, 2010
  2. Jay SoffianMar 17, 2010
  3. Linus TorvaldsMar 18, 2010
  4. Documentation: explain the meaning of "-g" in git-describe outputMarkus Heidelberg, Mar 22, 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.