Skip to content

Instantly share code, notes, and snippets.

@dwins
Created March 15, 2013 13:42
Show Gist options
  • Save dwins/5169943 to your computer and use it in GitHub Desktop.
Save dwins/5169943 to your computer and use it in GitHub Desktop.
#!/bin/sh
set -e # Bail out as soon as any command fails
git for-each-ref --format='%(objectname) %(refname)' refs/remotes |
# sort | uniq -w20 | # uncomment for deduplication, but this doesn't account for multiple branches pointing to the same commit
while read line;
do
ref=${line%\ *}
count=$(git log --oneline --since="-1week" $ref | wc -l)
[ $count -gt 0 ] && printf "%4d\t%s\n" $count "$line"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment