How would I count the total number of lines present in all the files in a git repository?
git ls-files gives me a list of files tracked by git.
git ls-files
: | git mktree | git diff --shortstat --stdin
Or:
git ls-tree @ | sed '1i\\' | git mktree --batch | xargs | git diff-tree --shortstat --stdin