Personnaly, I use a pre-build script to update the version before the 
compilation. The version itself is not committed back to the project since 
it is generated from the repository and it would modify the output of the 
pre-build script.

In git, we can use "git describe" to generate a version. Basically, it 
count the number of commits since a tag matching some regex. See

You can look how git use it itself:

On Sunday, December 16, 2012 12:00:53 PM UTC-5, Michael wrote:
> Hello,
> I am writing a tool to keep version numbers synced up within our projects, 
> bump AssemblyInfo versions, installer versions, and potentially also commit 
> / push back to repository for safe keeping.
> I've written Subversion-based solutions before, there's fairly strong 
> support for Svn, I'm reading also for Mercurial (Hg), along these lines.
> Is there anything comparable for Git that I can pull from NuGet or some 
> other source?
> Regards,
> Michael


Reply via email to