Skip to content

Instantly share code, notes, and snippets.

@siddarth siddarth/Workday summary
Last active Dec 13, 2015

Embed
What would you like to do?
# H/T: http://stackoverflow.com/questions/6240808/count-line-changes-with-git
git log --stat --author $(git config --get user.email) --since="$(ruby -e "print Time.now - 24*60*60")" --until="now" | awk -F',' '/files? changed/ {
files += $1
insertions += $2
deletions += $3
}
END {
print "Files Changed: " files
print "Insertions: " insertions
print "Deletions: " deletions
print "Lines changed: " insertions + deletions
}' | mail -s "Productivity metrics for $(ruby -e 'print Time.now.to_s')" $(git config --get user.email)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.