What is the Git equivalent for revision number?

With modern Git (1.8.3.4 in my case) and not using branches you can do:

$ git rev-list --count HEAD
68

But this has all kinds of issues and might not be easy to reproduce or easy to get back to the commit hash in case you need to. So try to avoid it or use it only as a hint.

Leave a Comment