Nathan W Nathan W - 1 year ago 146
Git Question

Count commits since tag

I am trying to count the number of commits since a tag was made.

I have tried using

git rev-list
but it seems to return the same results no matter what I try. This is what I have tried:

$ git rev-list 1.7Start^..HEAD | wc -l
$ git rev-list HEAD | wc -l

Trying to count how many commits since the 1.7Start tag was created. I'm currently on
hence using
but using
git rev-list master | wc -l
gives me the same.

There hasn't been 13000+ commits since 1.7

git rev-list master
show me every commit in master and hence yield a larger number than
which should just give me the difference?

Answer Source

The results that you're getting suggest that there is no history in common between 1.7Start^ and HEAD, so 1.7Start and HEAD must have different root commits. (The syntax a..b when passed to git rev-list just means "every commit in b which isn't in a.)

In the comments above, the questioner indicated that this arose because the repository was migrated from Subversion, and master is entirely distinct from the imported branch that 1.7Start points to.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download