Skip to content

Instantly share code, notes, and snippets.

@unicornrainbow
Forked from coreyhaines/churn script
Created May 23, 2012 20:56
Show Gist options
  • Save unicornrainbow/2777763 to your computer and use it in GitHub Desktop.
Save unicornrainbow/2777763 to your computer and use it in GitHub Desktop.
Bash script to generate churn counts in git repo
churn number and file name
git log --all -M -C --name-only | grep -E '^(app|lib)/' | sort | uniq -c | sort | awk 'BEGIN {print "count,file"} {print $1 "," $2}'
graph of churn number and frequency
git log --all -M -C --name-only | grep -E '^(app|lib)/' | sort | uniq -c | sort | awk '{print $1}' | uniq -c | sort | awk 'BEGIN { print "frequency,churn_count"} { print $1,$2}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment