Skip to content

Instantly share code, notes, and snippets.

@micuat
Last active December 14, 2015 19:29
Show Gist options
  • Save micuat/5137246 to your computer and use it in GitHub Desktop.
Save micuat/5137246 to your computer and use it in GitHub Desktop.
Shellscript to collect what you committed yesterday
LOGSDATE=$(date -v -1d +%Y-%m-%d) # yesterday
LOGUDATE=$(date +%Y-%m-%d) # today
GITUSER=micuat # git author
GITPREOPTIONS="--no-pager"
GITOPTIONS="--since=$LOGSDATE --until=$LOGUDATE --all --author=$GITUSER --no-merges"
#DIRPATH=/Users/naoto/ # Path to repos
for f in $(cat $HOME/bin/repos) # File includes repo list
do
git --git-dir=${DIRPATH}/${f}/.git $GITPREOPTIONS log --pretty="%ad %h %s" $GITOPTIONS | \
sed -e "s/^\\(.*\\)\$/$(basename $f) \\1/"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment