Skip to content

Instantly share code, notes, and snippets.

@menuka94
Forked from mandiwise/Count lines in Git repo
Created July 13, 2020 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save menuka94/77dcbfcdb34fe8c26e5b21a9505f415b to your computer and use it in GitHub Desktop.
Save menuka94/77dcbfcdb34fe8c26e5b21a9505f415b 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