Skip to content

Instantly share code, notes, and snippets.

@ishahid
Created March 25, 2015 04:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ishahid/257ad318cf2f350e2fb8 to your computer and use it in GitHub Desktop.
Save ishahid/257ad318cf2f350e2fb8 to your computer and use it in GitHub Desktop.
bash script to find monthly git commits by users on monthly basis
#/bin/bash
DATES=("2014-03-01" "2014-04-01" "2014-05-01" "2014-06-01" "2014-07-01" "2014-08-01" "2014-09-01" "2014-10-01" "2014-11-01" "2014-12-01" "2015-01-01" "2015-02-01" "2015-03-01")
let "counter = 1"
for i in "${DATES[@]}"
do
echo -n "$i"
echo
git shortlog -s -n --after=${DATES[counter-1]} --before=${DATES[counter]}
echo
let "counter +=1"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment