git number of commits per author
when working with git, it's often useful to know the number of commits per author
here’s a quick git command to show the number of commits per author
git shortlog --summary --numbered --all --no-merges
and here’s the breakdown of what’s going on
--summary
: shows a summary of commits by author.--numbered
: numbers the authors in the output like a leaderboard.--all
: includes commits from all branches--no-merges
: skips those boring merge commits
run the command, and git will spit out something like this
100 John Doe
50 Jane Smith
25 Alice Johnson
10 Bob Brown
it’s like your team’s commit leaderboard, right in your terminal
now you can see who’s been slacking and who’s been merging everyone else’s code