git今日のコミット数、昨日のコミット数、2日前の、9日前のコミット数を数えるやつ
を、git の alias に追加してみた。
g cc で当日。 g cc1 で翌日、 g cc9 で9日前とか、あまりあたまのよくない感じがするけれどまあ便利
.gitconfig
cc = shortlog -sn --no-merges --since='$(date +%Y/%m/%d) 00:00:00' # today's commit count cc1 = shortlog -sn --no-merges --since='$(date --date "1 day ago" +%Y/%m/%d) 00:00:00' --before='$(date +%Y/%m/%d) 00:00:00' # yesterday's commit count cc2 = shortlog -sn --no-merges --since='$(date --date "2 day ago" +%Y/%m/%d) 00:00:00' --before='$(date --date "1 day ago" +%Y/%m/%d) 00:00:00' cc3 = shortlog -sn --no-merges --since='$(date --date "3 day ago" +%Y/%m/%d) 00:00:00' --before='$(date --date "2 day ago" +%Y/%m/%d) 00:00:00' cc4 = shortlog -sn --no-merges --since='$(date --date "4 day ago" +%Y/%m/%d) 00:00:00' --before='$(date --date "3 day ago" +%Y/%m/%d) 00:00:00' cc5 = shortlog -sn --no-merges --since='$(date --date "5 day ago" +%Y/%m/%d) 00:00:00' --before='$(date --date "4 day ago" +%Y/%m/%d) 00:00:00' cc6 = shortlog -sn --no-merges --since='$(date --date "6 day ago" +%Y/%m/%d) 00:00:00' --before='$(date --date "5 day ago" +%Y/%m/%d) 00:00:00' cc7 = shortlog -sn --no-merges --since='$(date --date "7 day ago" +%Y/%m/%d) 00:00:00' --before='$(date --date "6 day ago" +%Y/%m/%d) 00:00:00' cc8 = shortlog -sn --no-merges --since='$(date --date "8 day ago" +%Y/%m/%d) 00:00:00' --before='$(date --date "7 day ago" +%Y/%m/%d) 00:00:00' cc9 = shortlog -sn --no-merges --since='$(date --date "9 day ago" +%Y/%m/%d) 00:00:00' --before='$(date --date "8 day ago" +%Y/%m/%d) 00:00:00'