git

Show Today's Git Commits

serhatteker

Serhat Teker

Posted on July 5, 2021

Show Today's Git Commits

We use --since flag in order to show the commit logs of today:

$ git log --since="yesterday"
# or
$ git log --since="midnight"
Enter fullscreen mode Exit fullscreen mode

This flag is very humanized, e.g:

$ git log --since="2 weeks ago"
$ git log --since="4am"
Enter fullscreen mode Exit fullscreen mode

For more info: git-scm

Default Log

My default git log command is:

$ git log --oneline --decorate --graph --all
Enter fullscreen mode Exit fullscreen mode

So I can use it with --since flag:

$ git log --oneline --decorate --graph --all --since="yesterday"
Enter fullscreen mode Exit fullscreen mode

Alias

An alias would be:

alias gloga='git log --oneline --decorate --graph --all'
alias glogay='git log --oneline --decorate --graph --all --since="yesterday"'
Enter fullscreen mode Exit fullscreen mode

All done!

💖 💪 🙅 🚩
serhatteker
Serhat Teker

Posted on July 5, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related