Skip to content

Instantly share code, notes, and snippets.

@hannu
Last active August 30, 2022 08:31
Show Gist options
  • Save hannu/4604611 to your computer and use it in GitHub Desktop.
Save hannu/4604611 to your computer and use it in GitHub Desktop.
Filter your own commit messages from git log and group by day. (Modified from http://stackoverflow.com/questions/2976665/git-changelog-day-by-day)
#!/bin/bash
AUTHOR=$(git config user.name)
DATE=$(date +%F)
git log --no-merges --format="%cd" --date=short --no-merges --author="$AUTHOR" --all | sort -u -r | while read DATE ; do
if [ $NEXT != "" ]
then
echo
echo [$NEXT]
fi
GIT_PAGER=cat git log --no-merges --format=" %s" --since=$DATE --until=$NEXT --author="$AUTHOR" --all
NEXT=$DATE
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment