Here's a useful command to list all commits made by you in the current working repository at a certain date. Just stick the following at the end of your .bashrc
file:
# Logs git commits by you on a certain date
commitsMade () {
git log --pretty='format:%C(yellow)%h %Creset%s%Cred%d' --branches \
--after="$1 0:00" --before="$1 23:59" --author "`git config user.name`";
}
Now both these commands list commits made today:
$ commitsMade today
$ commitsMade
This command lists commits made yesterday:
$ commitsMade yesterday
And this on an arbitrary date:
$ commitsMade 2024-08-02