How to retrieve the number of commits done by a person?

4

What is the Git command to retrieve the number of commits from a particular programmer?

    
asked by anonymous 01.02.2014 / 02:39

1 answer

6

Only one command is sufficient to get the total commits result of all authors:

git shortlog -n -s

Output:

9  paulomartinhago
1  Lucas Miguel

Another way to get a result, now by author:

git shortlog -n --author=paulomartinhago

Output:

paulomartinhago (9):
      Demo commit 9
      Demo commit 8
      Demo commit 7
      Demo commit 6
      Demo commit 5
      Demo commit 4
      Demo commit 3
      Demo commit 2
      Demo commit 1

Or as follows, without listing the commits:

git shortlog -n -s --author=paulomartinhago

Output:

9  paulomartinhago
    
01.02.2014 / 02:59