Subject: Re: Is it possible get the tag name of working copy in Git?

From: Torsten Bögershausen <[email-masked]>
Date: Fri, 13 Mar 2015 10:36:06 +0100

On 03/13/2015 08:08 AM, chen chang wrote:
> I want to use make file auto generate the revision number of working
> copy from the tag name in git.
You should have the tag name, as it is set up before running make,
and probably feed into both "git checkout tagXXYYXX" and the Makefile.

If you want the "version number", what is this ?
Git has a sha value, you can git it like this:

git rev-parse HEAD  | cut -b 1-9

HTH