What is the Git equivalent for revision number?

Radek picture Radek · Nov 7, 2010 · Viewed 208k times · Source

We use SVN at work, but for my personal projects I decided to use Git. So I installed Git yesterday, and I wonder what is the revision number equivalent in Git.

Let's say we work on version 3.0.8 and every bug fix has its own revision number we can use when we talk about this bug fix. So if I tag the code in Git to 3.0.8 what then I can use as a revision number or some other more detailed kind of identification? I find the hash not so user friendly for humans.

Answer

max picture max · Sep 16, 2013

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

$ git rev-list --count HEAD
68