Victor Haydin
Victor Haydin

Reputation: 3548

Versioning using GIT revision

We are planning to move to GIT from SVN in nearest future. Currently our software version format is {year}.{major}.{minor}.{revision}, for example 2010.3.2.32465. {revision} part is filled automatically by build script, so it is very simple to find exact version of code for any build. Off course we can use GIT revision for same purpose, but I am wondering that something like 2010.1.2.ce04503acce2452af1c3 will look ugly and less human-readable then SVN revision numbers. Assuming that we have some main central repository,

Any thoughts? Thanks.

Upvotes: 4

Views: 540

Answers (1)

tonio
tonio

Reputation: 10541

You can use git describe to get the identification of the commit you base your release on.

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

It provides the branch name, the number of commits and the sha id of the commit. This way, you have an ordering of the different releases, and full identification.

Upvotes: 3

Related Questions