How to show commit on a specific date?

Is there any shorter command to get a fix for a certain date than, for example, the expression below?

git log --after="2014-09-02 00:00:00" --before="2014-09-02 23:59:59" 
+5
source share
2 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' 

How can you use it

 git logondate 2014-09-02 

You should also read the Haacked blog post about git aliases . It contains many useful examples.

+8
source

Of course you can use unix timestamps, it's a little shorter :)

 git log --after=1409608800 --before=1409695199 
0
source

Source: https://habr.com/ru/post/1201882/


All Articles