Use this git command to generate a summary of work done for any given day:
# Get today's commits summary
git log --since="$(date +%Y-%m-%d) 00:00:00" --until="$(date +%Y-%m-%d) 23:59:59" --oneline --author="$(git config user.name)"
# Get detailed stats for today's commits
git log --since="$(date +%Y-%m-%d) 00:00:00" --until="$(date +%Y-%m-%d) 23:59:59" --stat --author="$(git config user.name)"
# Get first and last commit times to estimate work hours
echo "First commit:" && git log --since="$(date +%Y-%m-%d) 00:00:00" --until="$(date +%Y-%m-%d) 23:59:59" --format="%ai %s" --author="$(git config user.name)" | tail -1
echo "Last commit:" && git log --since="$(date +%Y-%m-%d) 00:00:00" --until="$(date +%Y-%m-%d) 23:59:59" --format="%ai %s" --author="$(git config user.name)" | head -1For specific dates, replace $(date +%Y-%m-%d) with the desired date in YYYY-MM-DD format:
# Example for September 5, 2025
git log --since="2025-09-05 00:00:00" --until="2025-09-05 23:59:59" --oneline --author="$(git config user.name)"When generating work summaries, use this template:
## Work Summary - [Date]
**Estimated Hours Worked**: [Start Time] - [End Time] ([Duration])
### Major Tasks Completed:
**1. Task Name ([Time])**
- Description of work done
- Files/features modified
- Version updates
**2. Task Name ([Time])**
- Description of work done
- Files/features modified
### Files Modified:
- **Category**: file1, file2, file3
- **Category**: file4, file5
### Pull Requests Merged: [Number]
Brief description of workflow approach.
**Current Theme Version**: [Version]- The script uses
git config user.nameto filter commits by author - Times are shown in the repository's configured timezone
- Use
git log --helpfor additional formatting options - Consider using
--no-mergesflag to exclude merge commits if needed