Search code examples
gitgoogle-code

User Friendly Git Revision Numbers?


I am using Git for a coding project on Google Code.

How do I get the revision numbers to be something meaningful like Alpha v1.0 or r86 instead of d68838463ecf or other jumble like that.


Solution

  • All git commits are given a cryptographically secure sha1 tag like the one you pasted. If you are looking to label a specific commit you should use git tag and tag the commit with whatever label you so choose.

    git tag "Release 1.0" 1f42f25b0e
    

    Because git is distributed, there was no way for it to use synchronous commit numbers (like SVN) without all distributions having to communicate with each other. Additionally, a sufficiently long string was required to mathematically ensure commit name uniqueness. This is why a sha1 is used as the unique name of the commit, but you are allowed to label via tags on top.