Skip to content

Instantly share code, notes, and snippets.

@olim7t
Created October 1, 2012 08:44
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olim7t/3810376 to your computer and use it in GitHub Desktop.
Save olim7t/3810376 to your computer and use it in GitHub Desktop.
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
Copy link

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