I just switched from Subversion to Git. Subversion's centralized architecture gives it a meaningful revision number that I used to build into the change-log for our web-based application to make it easy to log in and see which version is running on any given server. Git doesn't have a friendly build number. Rather I've seen it suggested that you parse something from the output of git status
or git tags
.
I'm not convinced we will always use customer-friendly names for our branches (sometimes we name them for an individual customer who doesn't want the fact that they use our system publicized). So I'm thinking I could have the build generate a datestamp/timestamp tag like 2012-11-21_08-40-23
and use that the way I used to use the Subversion revision number. The build would only generate this tag and add it to Git when we build a war file for deployment, so any deploy to any server would generate a tag.
Currently we deploy to test every few days, integration a few times a month (in bursts), and production every couple months.