Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
git-standup: find out what you did yesterday (or last friday)
#!/bin/bash
# git-standup: find out what you did yesterday (or last friday).
#
# Setup:
# 1. Change AUTHOR if your git user doesn't match your unix account.
# 2. Save somewhere on your path, make executable.
# 3. git config --global alias.standup '!git-standup'
# 4. Profit.
#
# Original idea via @paulgreg (https://twitter.com/paulgreg/status/248686055727972352)
AUTHOR=$USER
if [ `date +%w` == 1 ] ; then
LIMIT="3 days"
else
LIMIT="yesterday"
fi
git log --since "$LIMIT" --oneline --author $AUTHOR
@asm89

This comment has been minimized.

Copy link

@asm89 asm89 commented Dec 11, 2013

You can also set author to the configured git user:

AUTHOR=$(git config --get user.email)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment