Created
December 19, 2011 14:39
-
-
Save benjaminplee/1497489 to your computer and use it in GitHub Desktop.
git commit mining scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --shortstat --format=format:"%cd" --date=short --no-merges | sed -e '/^$/d;N;s/\n//;s/files changed, //;s/insertions(+), //;s/ deletions(-)//' | |
just delta info: | |
git log --shortstat --format=format:"" --no-merges --all | sed '/^$/d;s/[a-z()+,-]//g' | |
git log --format=format:"%cd" --date=short --no-merges --all | wc -l | |
num commits total | |
git log --format=format:"%cd" --date=short --no-merges --all | uniq -c | |
num commits for each day | |
git log --format=format:"%cd" --date=short --no-merges --all | uniq -c | awk '{ total += $1; count++ } END { print total/count }' | |
avg commits per day | |
git log --format=format:"%cd" --no-merges --all | tr ':' ' ' | awk '{print $4}' | sort | uniq -c | |
num commits in each 24 hour slot | |
git log --format=format:"%cd" --no-merges --all | awk '{print $1}' | sort | uniq -c | |
num commits by day of the week |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment