Skip to content

Instantly share code, notes, and snippets.

@gkthiruvathukal
Created January 29, 2016 16:54
Show Gist options
  • Select an option

  • Save gkthiruvathukal/a0161a0cb797934fafa3 to your computer and use it in GitHub Desktop.

Select an option

Save gkthiruvathukal/a0161a0cb797934fafa3 to your computer and use it in GitHub Desktop.
Build timeline of CLOC/NCLOC by commit, by file, and in XML format
# OS X: brew install cloc
# %H gives us the full hash (commit ID) only in a list
for commit in $(git log --pretty=format:"%H"); do
git checkout $commit
cloc --by-file --xml .
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment