How to generate changelog of commits groupped by date, in format:
[date today]
- commit message1
- commit message2
- commit message3
...
[date day+3]
- commit message1
- commit message2
- commit message3
...
(skip this day if no commits)
[date day+1]
- commit message1
- commit message2
- commit message3
...
[date since]
- commit message1
- commit message2
- commit message3
Any git log command, or smart bash script?
I wrote a script in python to create a week-by-week git log.
You could easily change it to days, months, etc by changing the timedelta
https://gist.github.com/NahimNasser/4772132
Here is dirty, but working version of the script I came up with:
git log
has--since
and--until
, it shouldn't be hard to wrap some stuff around that.That would require most certainly some kind of script.
A bit like this commandline-fu
(not exactly what you are after but can gives you an idea nonetheless)
I know about GitStats which has also data organized by date (but not the commit messages)
Note: the
git branch
part of this command is ill-fitted for scripting, as Jakub Narębski comments.git for-each-ref
orgit show-ref
are natural candidate for scripting commands, being plumbing commands.I couldn't get the accepted answer to handle today's commits as my setup didn't handle the NEXT variable properly on the first iteration. Git's log parameters will accept a time too, which removes the need for a NEXT date: