Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show commits for a specific date?

Tags:

git

Is there by any chance a more concise command to get commits for a specific date than for example the expression below?

git log --after="2014-09-02 00:00:00" --before="2014-09-02 23:59:59"
like image 814
Raffael Avatar asked Sep 05 '14 09:09

Raffael


1 Answers

You can create an alias.

git config --global alias.logondate '!f() { git log --after "$1 00:00:00" --before "$1 23:59:59"; }; f'

Than you can use it

git logondate 2014-09-02

You should also read Haacked's blog post about git aliases. It contains a lot of useful examples.

like image 64
filhit Avatar answered Sep 26 '22 00:09

filhit