Skip to content

Instantly share code, notes, and snippets.

@wancw
Created December 19, 2013 10:32
Show Gist options
  • Save wancw/8037283 to your computer and use it in GitHub Desktop.
Save wancw/8037283 to your computer and use it in GitHub Desktop.
Summarize what you did today.
#!/usr/bin/env bash
git log --all --since=midnight --author="$USER" $* --format='%d' --numstat \
| awk -f <(cat <<- 'SCRIPT'
/\(/ { NB=NB+1 ; next }
NF==3 { ADD=ADD+$1; DEL=DEL+$2; NC=NC+1 }
END { printf "+%d, -%d in %d commit(s), %d branch(es)\n", ADD, DEL, NC, NB }
SCRIPT)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment