Skip to content

Instantly share code, notes, and snippets.

@pathikrit
Created June 22, 2015 22:32
Show Gist options
  • Save pathikrit/fb75ba009960c4ed9ddf to your computer and use it in GitHub Desktop.
Save pathikrit/fb75ba009960c4ed9ddf to your computer and use it in GitHub Desktop.
git daily standup
log --all --no-merges --graph --date=relative --committer=$(git config --get user.email) --pretty=format:'%C(cyan) %ad %C(yellow)%h %Creset %s %Cgreen%d' --since="$(if [[ "Mon" == "$(date +%a)" ]]; then echo "last friday"; else echo "yesterday"; fi)"
@pathikrit
Copy link
Author

You can either paste it in front of git or put this in git aliases or if you use git extras, add via its alias manager

@Kleidersack
Copy link

Kleidersack commented May 22, 2017

Unfortunately the argument for since will not work for mondays if you have a non-english locale; setting the locale explicit (like "Mon" == "$(LC_TIME=en_US.UTF-8 date +%a)") fixes this issue. Full command would be:

git log --all --no-merges --graph --date=relative --committer=$(git config --get user.email) --pretty=format:'%C(cyan) %ad %C(yellow)%h %Creset %s %Cgreen%d' --since="$(if [[ "Mon" == "$(LC_TIME=en_US.UTF-8 date +%a)" ]]; then echo "last friday"; else echo "yesterday"; fi)"

P.S.: would be nice to merge my fork into this gist :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment