Skip to content

Instantly share code, notes, and snippets.

@Oshuma
Created February 23, 2017 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Oshuma/d24519d8a5f958b3f0800d9d64758cc1 to your computer and use it in GitHub Desktop.
Save Oshuma/d24519d8a5f958b3f0800d9d64758cc1 to your computer and use it in GitHub Desktop.
function git_daily --description 'Daily stats for given git branch'
# git log --since=1.day --author='<YOUR_EMAIL>' --shortstat $argv | awk '/^ [0-9]/ { f += $1; i += $4; d += $6 } END { printf("%d files changed, %d insertions(+), %d deletions(-)", f, i, d) }'
git log --since=12.hours --author='<YOUR_EMAIL>' --shortstat $argv | awk '/^ [0-9]/ { f += $1; i += $4; d += $6 } END { printf("%d files changed, %d insertions(+), %d deletions(-)", f, i, d) }'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment