0

I want to work with the growth of files on git, so I need the lines of code for each file at a specific date.

Is there a possibility to calculate the lines of code for each file from the output of git log --numstat --no-renames. I know the solution with wc -l but that isn't what I need. I tested it but I always get negative files.

1 Answers1

0

You can use a diff against an empty tree:

git diff --stat 4b825dc642cb6eb9a060e54bf8d69288fbee4904 <aCommit>

For a given commit, you will get the list of files and their number of lines.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250