How do I change the tag specified when using git describe?

I want to use "git describe" to get the "version number" of the application. Unfortunately the git repository was created using cvs-import and has an ugly old tag, so I would like to change it.

How do I change the tag specified when using "git describe"?

Note. I asked about this on IRC today and found the answer myself at the end. Thought it might be useful for others as well. :)

+1


a source to share


2 answers


#create a new anotated tag because by default git describes only looks for those
git tag -a NEWTAG

#push the new tags to the remote repository
git push --tags

      

cf: http://www.kernel.org/pub/software/scm/git/docs/git-describe.html



This may also interest you: How to pass the command output as a compiler flag through a Qt project file?

+3


a source


git describe now supports the -match option, which can filter tags to be selected



0


a source







All Articles