DEV Community

Discussion on: 7 Git tricks that changed my life

Collapse
 
nafis profile image
Nafis Fuad • Edited

The correct command is: git rev-list --count

In the article, there's just one hyphen instead of two before the count. Probably a typo.
Great article, loved it :)

Collapse
 
anirudhann profile image
Anirudhan • Edited

Not talking about the typo dude, Even I used two hyphens only. It will show the count, no doubt !

My point is that --

Lets say branch 'b' (child branch) which is taken from branch 'a' (parent branch), when i try to count the commits made only in branch 'b' - it will list the total commits including i did in the branch 'a'. (it will display total commits made in the repo or at least from its parent tree - will not show that accurate count on that particular child branch)