Last active
December 14, 2015 19:29
-
-
Save micuat/5137246 to your computer and use it in GitHub Desktop.
Shellscript to collect what you committed yesterday
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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