Is there a git command to check which developer pushed the most code for all history?
-
3similar to http://stackoverflow.com/questions/1828874/generating-statistics-from-git-repository – kelloti Feb 22 '11 at 01:36
-
possible duplicate of [Git: Blame Statistics](http://stackoverflow.com/questions/4589731/git-blame-statistics) – Ciro Santilli OurBigBook.com Sep 27 '14 at 19:49
5 Answers
I found something ,
git ls-files | xargs -n1 -d'\n' -i git-blame {} | perl -n -e '/\s\((.*?)\s[0-9]{4}/ && print "$1\n"' | sort -f | uniq -c -w3 | sort -r
User: askedrelic
Functions: perl sort uniq xargs
Prints per-line contribution per author for a GIT repository
Figures out total line contribution per author for an entire GIT repo. Includes binary files, which kind of mess up the true count.
If crashes or takes too long, mess with the ls-file option at the start:
git ls-files -x "*pdf" -x "*psd" -x "*tif" to remove really random binary files
git ls-files "*.py" "*.html" "*.css" to only include specific file types
Based off my original SVN version: http://www.commandlinefu.com/commands/view/2787/prints-total-line-count-contribution-per-user-for-an-svn-repository

- 21,762
- 11
- 61
- 90

- 369
- 6
- 26
LWN publish "Who wrote 2.6.x" reports for the Linux kernel using a tool called gitdm
I've had some success using it for other projects too, it's especially useful if you want to compare the contributions of different groups of developers based on employer.

- 3,692
- 2
- 16
- 7
Github provides impact graphs. For example, here's the graph for comex/frash.

- 8,975
- 2
- 37
- 47
If you're on Windows and use TortoiseGit, you can select Show Log for a repo. In the dialog coming up, select Statistics:
Now you can select either raw Statistics, Commits by author and Commits by date from the drop down box in the upper right corner:

- 64,417
- 29
- 168
- 201
-
3Use alt+printscreen to copy a screenshot of just the current window to your clipboard. – Thom Wiggers Feb 22 '11 at 14:17
-
@The Guy Of Doom: I know that. I actually used that to capture the windows. But that doesn't anonymize the images and highlights what I want to show. Therefore, I have to invest some little more work... – eckes Feb 22 '11 at 14:43
-
1
-
@The Guy Of Doom: now that you're telling, I can see them too. This is odd: when I paste into `paint`, there are no borders but when pasting into `Gimp` using `CTRL-SHIFT-V`, the borders appear. Strange stuff. When I capture the screen directrly through `Gimp`, no borders again... Good to know. – eckes Feb 22 '11 at 14:50
-
Looks like the GIMP shifts the image to the right X number of pixels, wrapping them around and displaying the lost pixels on the left... – Thomas Hunter II Sep 30 '11 at 17:57
As I mentioned in Determine current code distribution by author, you can easily produce that statistics using gitdm.

- 1
- 1

- 6,580
- 2
- 28
- 20