Skip to content

Instantly share code, notes, and snippets.

@yunho-c
Forked from mandiwise/Count lines in Git repo
Created June 6, 2025 01:06
Show Gist options
  • Save yunho-c/b69a26636e46338bc06b1d53ee5a3b9a to your computer and use it in GitHub Desktop.
Save yunho-c/b69a26636e46338bc06b1d53ee5a3b9a to your computer and use it in GitHub Desktop.
A command to calculate lines of code in all tracked files in a Git repo
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository
$ git ls-files | xargs wc -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment