tags:

views:

32

answers:

1

What would be a way to find largest commits (i.e. commits introducing most changes, for instance counted as the number of added/removed lines) in a git repo?

Note that I really want largest commits, not largest files, so http://stackoverflow.com/questions/1286183/git-find-fat-commit is not helpful here.

+1  A: 

you can use git log --format=format:"%H" --shortstat. It will output something like

b90c0895b90eb3a6d1528465f3b5d96a575dbda2
 2 files changed, 32 insertions(+), 7 deletions(-)

642b5e1910e1c2134c278b97752dd73b601e8ddb
 11 files changed, 835 insertions(+), 504 deletions(-)

// other commits skipped

Seems like an easily parsed text.

max