Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get number of commits per author on all branches of Git repo

Tags:

git

github

I used git shortlog -sn --all to get a list of all authors with their commits for all the branches.

The problem is , i just want the list of authors that have been contributing since last year , ignoring the others. Is there any way to include a time range in this? Because from the help page i don't see anything like that.

The git-hub also provides this through API call but that just returns the top 100 contributors, not all of them.

Thanks

like image 479
Ijaz Ahmad Avatar asked Nov 04 '25 19:11

Ijaz Ahmad


1 Answers

You can use the since argument for this.

git shortlog -sn --all --since=1.year

It has relative times but you can also use dates:

git shortlog -sn --all --since={2016-01-01}

Or a range:

git shortlog -sn --all --after={2013-04-01} --before={2014-01-01}

like image 126
bcmcfc Avatar answered Nov 07 '25 11:11

bcmcfc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!