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

2015-03-13 Thread chen chang
I want to use make file auto generate the revision number of working copy from the tag name in git. So as questioned in subject, I have tried to use 'git describe', it works well in most case, and the output is good match my requirement. Problem is: when there are multiple tags on same one commit,

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

2015-03-13 Thread Torsten Bögershausen
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

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

2015-03-13 Thread Stefan Beller
On Fri, Mar 13, 2015 at 2:36 AM, Torsten Bögershausen tbo...@web.de wrote: 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. Maybe you're looking for git describe? http://git-scm.com/docs/git-describe