Timeframe Handling
git-recap integrates seamlessly with Git's internal date parsing engine, meaning you can pass almost any natural language date or specific timestamp to filter your commits.
Deep Dive into Git Dates
Under the hood, any value passed to the --since or --until flags is directly fed into git log. This provides immense flexibility. You can use relative dates ("2 weeks ago"), absolute dates ("2023-10-01"), or even specific times ("yesterday 10:00am").
| Scenario | Command Example |
|---|---|
| Default | last 24 hours ("1 day ago") |
| Today | git-recap --today |
| Yesterday | git-recap --yesterday |
| Week | git-recap --week |
| Custom Flag | git-recap --since "3 days ago" |
| Bounded Window | git-recap --until yesterday |
| Environment | GIT_RECAP_SINCE="1 week ago" git-recap |
Common Scenarios
The Daily Standup
If your standup is every morning, you typically want to see everything you did yesterday, plus any early-morning commits today. The --yesterday flag perfectly encapsulates "from Yesterday 00:00 to Today 00:00". Alternatively, use --today to get everything since midnight.
$ git-recap --todayThe Weekly Sync
For weekly updates, sprint planning, or 1-on-1s, you can use the --week shortcut, or specify exact boundaries if your sprint starts on a Wednesday.
$ git-recap --since "last wednesday"Environment Variables
If you find yourself frequently running the same timeframe, you can set it via environment variables in your ~/.bashrc or ~/.zshrc file.
# Set default recap window to the last 48 hours export GIT_RECAP_SINCE="2 days ago"