Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@marutanm
Created December 15, 2011 06:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marutanm/1480051 to your computer and use it in GitHub Desktop.
Save marutanm/1480051 to your computer and use it in GitHub Desktop.
gitで直近n日の自分のコミットを表示するサブコマンドrecent
[alias]
recent = "!$SHELL -c ' \n\
n=1 \n\
1=\"${1:-$n}\" \n\
git --no-pager log --since=\"$1\".days --author=\"`git config user.name`\" --pretty=format:\"%h - %ar : %s\" --branches --reverse\n\
' __dummy__"
# デフォルトで1日分、git recent 10 で10日分
#参考 http://whileimautomaton.net/2009/05/08003459
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment