Skip to content

Instantly share code, notes, and snippets.

@mikegee
Created September 11, 2012 12:54
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 mikegee/3698238 to your computer and use it in GitHub Desktop.
Save mikegee/3698238 to your computer and use it in GitHub Desktop.
A log of the last 7 days worth of commits to all the branches of all the repos in the current folder.
#!/bin/bash
for repo in *
do
[[ -d "${repo}/.git" ]] || continue
cd "${repo}"
git branch --list --no-color | cut -c'3-' | xargs -I branch git --no-pager log --author="`git config user.name`" --format="${repo} %Credbranch%Creset %Cgreen%ar%Creset %s" 'branch@{7 days ago}..branch@{now}' 2>/dev/null
cd ..
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment