Skip to content

Instantly share code, notes, and snippets.

@chrismarksus
Created December 8, 2017 13:16
Show Gist options
  • Save chrismarksus/a3a189843ce2862af3ea3d0f10f3ab7c to your computer and use it in GitHub Desktop.
Save chrismarksus/a3a189843ce2862af3ea3d0f10f3ab7c to your computer and use it in GitHub Desktop.
bash scripts to generate commit churn and line counts on files in a git repo
git log --all -M -C --name-only | sort | uniq -c | sort | awk 'BEGIN {print "count,file"} {print $1 "," $2}' > git_churn_data.csv
git ls-files | xargs wc -l | awk 'BEGIN {print "loc,file"} {print $1 "," $2}' > git_sloc.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment