+1 vote
1 view
in Devops and Agile by (20k points)

Is there a command I can invoke which will count the lines changed by a specific author in a Git repository? I know that there must be ways to count the number of commits as Github does this for their Impact graph.

1 Answer

0 votes
by (28.4k points)

This following command should do the magic:

$ git ls-files -z | xargs -0n1 git blame -w | ruby -n -e '$_ =~ /^.*\((.*?)\s[\d]{4}/; puts $1.strip' | sort -f | uniq -c | sort -n

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...