7

I have to display the number of lines added(and deleted) to a certain file by all commits.

Jorge Castro
  • 71,754
johnny
  • 121

1 Answers1

8

Use git log --numstat --oneline <Filename>. This will give you a list of commits for file <Filename>, with two lines for each commit, using this syntax:

[sha hash] [commit title line]
[lines added] [lines removed] [path to file in repository]
tohuwawohu
  • 7,352