Git number of commits per author on all branches

116,295
git shortlog -s -n --all --no-merges

Will give you statistics for all branches.

EDIT: Added --no-merges to exclude statistics from merge commits.

Share:
116,295
jabal
Author by

jabal

Java / Java EE developer SOreadytohelp

Updated on July 17, 2022

Comments

  • jabal
    jabal almost 2 years

    I'd like to get the number of commits per author on all branches. I see that

    git shortlog -s -n
    

    Prints a very nice list but it is not counting the commits that are not yet merged from other branches. If iterate this command over every branch then obviously the common commits get counted multiple times. Could you give me a script/command that would yield me the overall picture?

  • Jaex
    Jaex almost 8 years
    If anyone also need emails then you can use -e command like this: git shortlog -s -n -e --all
  • mBardos
    mBardos almost 7 years
    if you need a time period, specify --since="22 Aug 2017"
  • angularrocks.com
    angularrocks.com almost 7 years
    @mBardos --since="22 Aug 2017" --before="01 Sept 2017" to get period
  • mBardos
    mBardos almost 7 years
    @Kuncevic I meant period as a date from past till now ;)
  • niken
    niken over 6 years
    Any way to include users who did not make commits? Show them as 0?
  • ralphtheninja
    ralphtheninja over 6 years
    @sloven Anyone not part of that result made 0 commits :)
  • Milind Anantwar
    Milind Anantwar over 6 years
    Can this be filtered specific to any branch?