DEV Community

Serhat Teker
Serhat Teker

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

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!

Top comments (0)