Last active
January 28, 2017 11:20
-
-
Save yasuharu519/bded5a4aecfe4dbe3bd0 to your computer and use it in GitHub Desktop.
git-today script
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
#!/bin/sh | |
LAST_BEFORE_TODAY=$(git log --oneline --until='yesterday 23:59:59' | head -1 | cut -d' ' -f 1) | |
AUTHOR="sawada_yasuharu" | |
echo "---------- git commit num today ---------" | |
git rev-list ${LAST_BEFORE_TODAY}..HEAD --count --author=${AUTHOR} | |
echo "---------- git commit summary today ---------" | |
git log ${LAST_BEFORE_TODAY}..HEAD --oneline --author=${AUTHOR} | |
echo "---------- git diff summary today ---------" | |
git log --numstat --author=${AUTHOR} ${LAST_BEFORE_TODAY}..HEAD | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d lines add\n-%d lines delete\n", plus, minus)}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment