Git's going to have built-in "generation numbers" soon. http://permalink.gmane.org/gmane.comp.version-control.git/17...
edit: jacknagel points out that they actually didn't go with this after all. Insted: https://github.com/git/git/commit/ffc4b8012d9a4f92ef238ff72c...