Skip to content

Instantly share code, notes, and snippets.

@michaelwoods
Created July 13, 2016 15:06
Show Gist options
  • Select an option

  • Save michaelwoods/9073425736428e4b68bb7765917c4745 to your computer and use it in GitHub Desktop.

Select an option

Save michaelwoods/9073425736428e4b68bb7765917c4745 to your computer and use it in GitHub Desktop.
List last two working days of commits from git repos for scrum status.
#!/usr/bin/env bash
#place the git repo directories here, space delimited
PROJECTS=(~/Projects/foo ~/Projects/bar)
DOW=$(date +%w)
if [[ $DOW -eq 1 ]]; then #Monday
SINCE=4.days
else
SINCE=2.days
fi
for project in ${PROJECTS[@]}; do
echo $project
USER=$(git -C $project config user.email)
git -C $project log --all --author=$USER --since=$SINCE --oneline
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment