It's Daily Standup time and there you are: unsure about what you did since yesterday - not because you did nothing but because you forget things easily. 😂
Yeah, the person here is me, and I often can't answer quickly when I'm asked "What have you done today?". Well, fortunately, I'm a programmer who knows Git, and I made a command that quickly reminds me of what I've done since yesterday:
git standup
Cool, right? Yeah, this is a Git alias, a shortcut for a more complex Git command. Git aliases reside on a file named .gitconfig
in your home folder. To set up my own git standup
alias, I added the following line to ~/.gitconfig
:
[alias]
standup = log --all --since yesterday --author=joel
This aliased Git command will list all commits from all branches that have been made in the last 24 hours by an author that contains joel
somewhere on his name or email.
You might want to change the author field with something unique to your name/email.
Note: if you already have a
[alias]
line on your.gitconfig
there's no need to add another one. Just make sure yourstandup
alias is placed after it.
This is it. After saving the file, you'll be able to use your alias as a Git subcommand:
git standup
Pro tip: since I tend to prefer shorter outputs, I empowered my git standup
with some additional flags:
[alias]
standup = log --all --abbrev-commit --graph --pretty=oneline --since yesterday --author=joel
Now my git standup
outputs something like this:
$ git standup
7b2280e (origin/branch-123) I did something awesome here
7b2280e (branch-123) Here goes a hidden bug packed as a feature to production
15f61fa (refs/stash) WIP
433ed2b index on branch-456: e6f9335 This is another great commit
PS: if you're curious about how my .gitconfig
looks like, it's public on my GitHub. You can check it here.
How about you? Do you have any Git trick that makes your life as a developer easier? Share it in the discussions below. 🙂
Top comments (1)
I've used journal to help me with this. Other facility is it help me think about problems that I'm involved. But I like a lot this alias, congrats and thanks for share.