f4shwg
Last Updated: April 13, 2016
·
4.543K
· ksi
B451817e013f2084e84990d7b7d36b21

Git for Daily Standup

Working on several branches I had to find out what I've done the last workday. Here's my alias for .gitconfig

standup = !"git log --reverse --branches --since=$(if [[ "Mon" == "$(date +%a)" ]]; then echo "last friday"; else echo "yesterday"; fi) --author=$(git config --get user.email) --format=format:'%C(cyan) %ad %C(yellow)%h %Creset %s %Cgreen%d' --date=local"

You have to call

git standup

on every repo you're on.

Precondition: set up your email in .gitconfig.

Remark: I had to use the ! notation because of adding shell functionality. Using a bash function didn't work - git doesn't load it somehow.

Now I'm working on a (inhouse) github version to get all things I've done.

Say Thanks
Respond

3 Responses
Add your response

4633
70e1167dbde5397557b0ec6fabb3d90a

You can also make a script and call it git-filename and make sure it's on your path, then you call it with git filename from shell. Instead of using the bang.
There is no need for an alias with this method.

over 1 year ago ·
4658
B451817e013f2084e84990d7b7d36b21

Yes, I know. I always try to start small, then it grows...
In this case it would be more readable. However, I like to have my git (related) commands as compact as possible.
Let's see.
Thanks for reminding me.

over 1 year ago ·
6837
736212 10200976756252420 836055407 o

Great work but you got a bug in the alias :) It don't work on Mondays.

standup = !"git log --reverse --branches --since='$(if [[ "Mon" == "$(date +%a)" ]]; then echo "last friday"; else echo "yesterday"; fi)' --author=$(git config --get user.email) --format=format:'%C(cyan) %ad %C(yellow)%h %Creset %s %Cgreen%d' --date=local"
over 1 year ago ·
Filed Under