Skip to content

Instantly share code, notes, and snippets.

@sasha7
Forked from tinifni/gist:3756796
Created November 14, 2017 23:31
Show Gist options
  • Save sasha7/4fc7e3094c35bbcddfccad85b006c3de to your computer and use it in GitHub Desktop.
Save sasha7/4fc7e3094c35bbcddfccad85b006c3de to your computer and use it in GitHub Desktop.
Remember what you've done since your last standup
# zsh script checks first if there were any commits done
# by author yesterday. If there were, return those. If
# there weren't, look for all commits since last Friday
# at midnight as it may have been a weekend.
#
# Use your name in the --author for all commands
gitstandup() {
if [ -z "$(git log --all --pretty=format:'* %s' --no-merges --reverse --author=Justin --since=yesterday.midnight)" ]; then
git log --all --pretty=format:'* %s' --no-merges --reverse --author=Justin --since=last.friday.midnight;
else
git log --all --pretty=format:'* %s' --no-merges --reverse --author=Justin --since=yesterday.midnight;
fi
}
alias gtsu='gitstandup'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment