DEV Community

Serhat Teker
Serhat Teker

Posted on • Originally published at tech.serhatteker.com on

1

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!

👋 Kindness is contagious

Please leave your appreciation by commenting on this post!

It takes one minute and is worth it for your career.

Get started

Thank you!

Top comments (0)

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay