Git Statistics, Bash-Style
Some one-liner Git statistics
Commit Ranking, by Author, by Commit Count
git shortlog -nsProject Commits, by Day of Week
for i in Mon Tue Wed Thu Fri Sat Sun; do
echo $( echo " $i: "; git shortlog -n --format='%ad %s'| grep "$i " | wc -l);
doneProject Commits, by Day of Week, Since Some Date
Useful to see a difference when the dev team changes, for example. If you want to count commits before a date, replace --since with --until.
for i in Mon Tue Wed Thu Fri Sat Sun; do
echo $( echo " $i: "; git shortlog -n --format='%ad %s' --since='2011-06-31'| grep "$i " | wc -l);
doneProject Commits, by Hour of Day
for i in `seq -w 0 23`; do
echo $( echo " $i:"; git shortlog -n --format='%ad %s' | grep " $i:" | wc -l);
doneProject Commits, by Hour of Day, Since Some Date
Here you can replace --since with --until.
for i in `seq -w 0 23`; do
echo $( echo " $i:"; git shortlog -n --format='%ad %s' --until='2011-06-31' | grep " $i:" | wc -l);
doneReference: [jazzy coding]
[jazzy coding]: https://phreaknerd.wordpress.com/2012/03/27/git-statistic-bash-one-liners/
Rodrigo de Avila