-
-
Save afknapping/ef9d0fb753fde7bf33ae to your computer and use it in GitHub Desktop.
alias wtf-did-i-do-yesterday="echo '' && echo 'wtf did i do yesterday?' && echo '' && git log --pretty=format:'%Cred%h%Creset - %s%Creset - %Cgreen%cd%Creset ' --date=relative --all --since=2.days.ago --until=1.day.ago --author=\"$(git config user.name)\"" | |
alias wtf-did-i-do-today="echo '' && echo 'wtf did i do today?' && echo '' && git log --pretty=format:'%Cred%h%Creset - %s%Creset - %Cgreen%cd%Creset ' --date=relative --all --since=6am --author=\"$(git config user.name)\"" | |
# the aliases need escaped double quotes | |
# to try the commands directly, copy this and paste into your terminal: | |
# echo '' && echo 'wtf did i do today?' && echo '' && git log --pretty=format:'%Cred%h%Creset - %s%Creset - %Cgreen%cd%Creset ' --date=relative --all --since=6am --author="$(git config user.name)" |
true, the relative dates seem to have a breakpoint somewhere in the "30s of hours ago" where they switch to "2 days ago".
the original idea was to have a list of commits for the morning daily, so the the timestamps would normally not go below 24 hours.
Sure they are from 1 day ago? The command reads "--since=2.days.ago --until=1.day.ago", so it shows stuff from 2 days ago as well - works like that here.
the original idea was to have a list of commits for the morning daily, so the the timestamps would normally not go below 24 hours.
but that wouldn't show anything from yesterday if i check it in the morning...
@romanbloeth is right, i think it should be --since=yesterday --until=6am
Anyway, big thx to you, @filtercake, as this is really a very nice and handy alias for my everyday use from now on! Great idea!
sweet, but somehow the timestamp is... weird - shows "2 days ago" for commits from yesterday...