tags:

views:

279

answers:

1

I want to use "git describe" to get the "revision 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 can I change the tag given when using "git describe"?

Note: I asked this on IRC today and found the answer myself in the end. Thought it might be useful to others too. :)

+1  A: 
#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 be of interest to you: http://stackoverflow.com/questions/852437/how-can-i-pass-the-output-of-a-command-as-a-compiler-flag-through-a-qt-project-fi

KIAaze
http://www.rockstarprogrammer.org/post/2008/oct/16/git-tag-does-wrong-thing-default/
Dustin
Thanks for the info. So signed tags can be used too. :)
KIAaze