On Sun, Aug 18, 2013 at 4:25 AM, Dr. Trigon <dr.trigon@surfeu.ch> wrote:

> I'd suggest using semantic version numbers (http://semver.org/)
> for git annotated tags (make sure to push them to the server too)
> and then use `git describe` as a reasonable approximation of the
> SVN revision number, but with more information provided as to the
> significance of changes than a simple revision counter.

Sound good - can you explain how to make this automatic?

The version numbers need to be assigned by the developers since only they know whether it's a new patch release, minor version release, or major release.

git tag -a -m "Next major release" v3.0.0
git push origin --tags

The version number can be merged into the source by a build script or git's pseudo-keyword expansion

VERSION=`git describe`
http://git-scm.com/book/ch7-2.html#Keyword-Expansion

The format that git describe uses looks like

v3.0.0-46-g71a77dc

which would be 46 commits after 3.0.0 with the given hash as the latest commit.

Tom