Shell script for listing git commits for current date or given date range.
A git alias short
, add to local ~/.gitconfig
[alias]
short = log --decorate --pretty=format:\"%ai | %s%d [%an]\" --abbrev-commit --all
Edit the author
and local_projects_directory_root
variables in the beginning of script to match your directory structure
List all commits for current day:
./daily-git-commits.sh
List all commits for specific date range with date parameter(s) in format YYYY-MM-DD
Fom given date to current day
./daily-git-commits.sh 2022-03-01
Range between the given dates
./daily-git-commits.sh 2022-03-01 2022-03-06
- Make settings configurable (
author
andlocal_projects_directory_root
) - Add input parameter date validation
- Get rid of
short
alias requirement - Run without parameter to return current day's work
🙌 High five @tomimikola for the original idea/script.