Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what does the hash from `git describe` refer to?

$ git describe --tags --long
test-1-g3c31c73
           \_ ???

The g3c31c73 doesn't seem to point to anything... The doc says it's the abbreviated object name of the most recent commit, but it's not the HEAD commit hash, and find .git/objects -type f | grep g3c31c73 finds nothing.

like image 283
dwelle Avatar asked Sep 21 '16 09:09

dwelle


1 Answers

The "g" isn't a part of the commit.

Try looking for a commit 3c31c73 using git show 3c31c73.

From the git-describe doc:

The "g" prefix stands for "git" and is used to allow describing the version of a software depending on the SCM the software is managed with. This is useful in an environment where people may use different SCMs.

like image 195
blue112 Avatar answered Oct 08 '22 09:10

blue112