Recently, my friend Jonas was wondering how one might go about showing a diff of all the work they’ve done in a day. Turns out, it’s not that straight foward.

What did I do yesterday?

This is exactly what git-today does. Optionally you can also look at what other people have done, and change the timeframe too.

By default (with no arguments) git-today will show you everything you have done in the last day. General usage:

git today [arguments...] Arguments: -h Show this help. -u User to find diff for. Default is current user. -s Date to search since. Default is the last day. Examples: git today git today -s "14 days ago" git today -u some@email.tld git today -s "7 days ago" -u person@email.tld

Get It

#!/usr/bin/env zsh # git-today # Written by: Gianni Chiappetta <gianni@runlevel6.org> # Requires: git 1.7.5+, zsh 4.3.11+ function get_user { git config user.email } function git_branch () { ref = $( git symbolic-ref HEAD 2> /dev/null ) || return echo ${ ref #refs/heads/ } } # Command normalisation branch_name = "git-today-tmp" cmd = "go" user = $( get_user ) since = "1 day ago" while getopts "hu:s:" option do case $option in h ) cmd = "help" ;; u ) user = $OPTARG ;; s ) since = $OPTARG ;; ? ) cmd = "help" ;; esac done

# Help read -d '' help_text << "EOS" Git Today - Show one big diff of the work you have done in the past day. Written by: Gianni Chiappetta <gianni@runlevel6.org> Usage: git today [ arguments... ] Arguments: -h Show this help. -u User to find diff for . Default is current user. *Currently broken* -s Date to search since. Default is the last day. Examples: git today git today -s "14 days ago" git today -u some@email.tld git today -s "7 days ago" -u person@email.tld EOS