Skip to content

Instantly share code, notes, and snippets.

@royingantaginting
Created March 1, 2016 07:13
Show Gist options
  • Save royingantaginting/598d11a5f8859272f0fe to your computer and use it in GitHub Desktop.
Save royingantaginting/598d11a5f8859272f0fe to your computer and use it in GitHub Desktop.
Print git commit statistics for each users
#!/bin/bash
while read -r -u 9 date name
do
day=$(date -d $date +%A)
if [[ "$day" == "Sabtu" || "$day" == "Minggu" ]]; then
echo "$day $date $name"
echo
GIT_PAGER=cat git log --committer="$name" --since="$date 00:00:00 +0700" --until="$date 23:59:59 +0700" --format=' * [%h] %s' --date=short
echo
fi
done 9< <(git log --format=$'%cd %cn' --date=short --since="2015-9-1 00:00:00 +0000" | sort --unique --reverse)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment