Find detailed git log after certain commit


For grading purposes, I want to find the metric of how many lines any author committed after a certain commit. I looked at git log but there is just too much data for it to be reasonably counted. Is there another method to get this information?


You can use git log to see what files have changed and how many lines of them:

git log --author="aerabi" --pretty=tformat: --numstat

The output would look like this:

10      67      tsconfig.json
2       2       package-lock.json
1       1       package.json
25      0

First column for added and the second for removed.

And because it’s a simple git log, you can limit the commits in many different ways:

Last 5 commits

git log --author="aerabi" --pretty=tformat: --numstat -n4

One certain days

git log --author="aerabi" --pretty=tformat: --numstat --before=2022-01-13 --after=2021-07-12

Answered By – Mohammad-Ali A'RÂBI

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published