Skip to content

Instantly share code, notes, and snippets.

@joshuajabbour
Created February 25, 2011 22:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save joshuajabbour/844665 to your computer and use it in GitHub Desktop.
Save joshuajabbour/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