How to generate changelog of commits groupped by date, in format:
[date today]
- commit message1
- commit message2
- commit message3
...
[date day+3]
- commi
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:
#!/bin/bash
# Generates changelog day by day
echo "CHANGELOG"
echo ----------------------
git log --no-merges --format="%cd" --date=short | sort -u -r | while read DATE ; do
echo
echo [$DATE]
GIT_PAGER=cat git log --no-merges --format=" * %s" --since="$DATE 00:00:00" --until="$DATE 24:00:00"
done