Skip to content

Instantly share code, notes, and snippets.

View bundit's full-sized avatar
👍
Feeling motivated

Bundit Hongmanee bundit

👍
Feeling motivated
View GitHub Profile
@bundit
bundit / count-lines-of-code-in-local-repo
Created October 8, 2020 03:22
Count lines of code a git tracked project
// Referenced from https://gist.github.com/mandiwise/dc53cb9da00856d7cdbb
// List line count of all tracked files
$ git ls-files | xargs wc -l
// Match only certain file-types
$ git ls-files -- '*.js*' | xargs wc -l
// Add additional file-types to count
$ git ls-files -- '*.js*' '*.jsx' '*.tsx' '*.css' | xargs wc -l