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
I use the following:
git grep ^ | wc -l
This searches all files versioned by git for the regex ^, which represents the beginning of a line, so this command gives the total number of lines!
^