Skip to content

Instantly share code, notes, and snippets.

@neonexus
Last active May 24, 2020 01:27
Show Gist options
  • Save neonexus/af247a60a1ab18ebb8ba67c38ea812c8 to your computer and use it in GitHub Desktop.
Save neonexus/af247a60a1ab18ebb8ba67c38ea812c8 to your computer and use it in GitHub Desktop.
Count lines in git repo, minus common files / folders you didn't actually write.
git ls-files --exclude-standard -- ':!:**/*.[pjs][npv]g' ':!:**/*.ai' ':!:.idea' ':!:**/*.eslintrc' ':!:package-lock.json' | xargs wc -l

':!:**/*.[pjs][npv]g' excludes all png, jpg and svg files.

':!:**/*.ai' excludes .ai files.

':!:.idea' excludes the .idea (WebStorm anyone?) folder.

':!:**/*.eslintrc' excludes .eslint files.

':!:package-lock.json' excludes the biggest offender of all, the package-lock.json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment