Skip to content

Instantly share code, notes, and snippets.

@jfelixetcetera
Created February 25, 2011 22:49
Show Gist options
  • Save jfelixetcetera/844665 to your computer and use it in GitHub Desktop.
Save jfelixetcetera/844665 to your computer and use it in GitHub Desktop.
Shows all local and remote commits for X user over the last Y days. Add to your .gitconfig -- Usage: `git last Y X` (author name can be partial)
[alias]
last = "!fn() { S=1; A=`git config --get user.name`; if [ -n \"$1\" ]; then S=\"$1\"; shift; fi; if [ -n \"$1\" ]; then if [ \"$1\" != \"me\" ]; then A=\"$1\"; fi; shift; fi; git log -i --since=\"$S days ago\" --author=\"$A\" --branches --remotes --format='%C(yellow)%t%Creset %s (%an)' \"$@\"; }; fn"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment