Git history is not linear, so numbering commits sequentially is meaningless.
Git already has a mechanism for naming commits, anyway. They are called "tags".
Git already has a mechanism for naming commits, anyway. They are called "tags".
edit: jacknagel points out that they actually didn't go with this after all. Insted: https://github.com/git/git/commit/ffc4b8012d9a4f92ef238ff72c...
__C__
/ \
A---B---D
A is commit number one. D is commit number three. If B is two, then what is C? Assuming you can come up with a consistent view when all the information about the branch topology is available, what about when people have disconnected branches? How do you avoid duplicate generation numbers? If you can't avoid duplicate generation numbers, what's the point of having them? "Fixed in commit 2." Great, which commit 2 did you mean?It often won't uniquely identify commits, but revision numbers in SVN are also sometimes used imprecisely ("oh, it was around R1500"), so I think it would have value.
https://github.com/stephenh/git-central/blob/master/server/p...
(It makes a tag-per-commit; I'm not saying that's necessarily a good idea, but if you really want revision numbers...)