Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git command for count of commit messages containing a string, per user

Tags:

git

I know about git shortlog -sne, and git grep, but I need to kinda combine the two.

I'm searching for the number of occurrences of a string in the commit message, per user. I'd like the output to be:

Will: 54
Dave: 34
... etc.

Can someone help?

like image 902
Will Avatar asked May 19 '26 20:05

Will


1 Answers

If by git sne you mean git shortlog -sne then it can take a --grep option to grep the commit messages.

git shortlog -sne --grep="a string"
like image 85
Michał Politowski Avatar answered May 21 '26 13:05

Michał Politowski



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!