The AppGini Blog
A few tips and tricks to make your coding life a tiny bit better.

Create a git today Shortcut to List Today’s Commit Messages in Markdown

When you’re writing daily updates, preparing a changelog, filling out a standup report, or summarizing your work at the end of the day, you often need a quick list of the commits you made today.

You can get that information from git log, but typing a full date range every time is repetitive and error-prone:

1
git log --since='2026-06-21 00:00' --until='2026-06-22 00:00' --pretty=format:'%s'

This works, but it has one obvious problem: you have to update the dates every day.

A cleaner solution is to use Git’s relative date syntax and then wrap the command in a Git alias.

The Problem: Listing Only Today’s Git Commit Messages

Suppose you want to list the commit messages from today only.

You might start with a command like this:

1
git log --since='2026-06-21 00:00' --until='2026-06-22 00:00' --pretty=format:'%s'

This tells Git:

  • show commits since 2026-06-21 00:00
  • show commits until 2026-06-22 00:00
  • print only the commit subject using %s

The output might look like this:

1
2
3
Fix login redirect bug
Add user settings page
Update Docker compose config

That’s useful, but the hard-coded dates make it inconvenient. If you run this tomorrow, you need to edit both dates.

For a command you might use every day, that’s not ideal.

The Better Version: Use --since=midnight

Git understands relative dates, including midnight.

Instead of entering today’s date manually, you can write:

1
git log --since=midnight --pretty=format:'%s'

This means: show commits since the start of the current day.

So instead of maintaining a command like this:

1
git log --since='2026-06-21 00:00' --until='2026-06-22 00:00' --pretty=format:'%s'

You can use this:

1
git log --since=midnight --pretty=format:'%s'

Much cleaner.

Format the Output as a Markdown Bulleted List

If you want to paste the output into a Markdown document, changelog, GitHub issue, pull request, Slack update, or daily notes file, you can prefix each commit subject with - .

Use this:

1
git log --since=midnight --pretty=format:'- %s'

Example output:

1
2
3
- Fix login redirect bug
- Add user settings page
- Update Docker compose config

Now the result is already formatted as a Markdown bulleted list.

That means you can copy and paste it directly into places like:

  • a daily standup update
  • a pull request description
  • a changelog draft
  • a project management comment
  • a developer journal
  • release notes
  • team status reports

The Elegant Solution: Create a git today Alias

git today shortcut example, no hard-to-remember commands

The final improvement is to turn the command into a shortcut.

Git supports aliases through git config. You can define a custom command called today like this:

1
git config --global alias.today "log --since=midnight --pretty=format:'- %s'"

After running that once, you can use:

1
git today

And Git will run:

1
git log --since=midnight --pretty=format:'- %s'

The output will look like this:

1
2
3
- Fix login redirect bug
- Add user settings page
- Update Docker compose config

That’s the elegant solution: a short, readable command that produces copy-paste-ready Markdown.

Optional: Include the Short Commit Hash

Sometimes a commit message alone is enough. But if you want to include the short commit hash for traceability, define the alias like this instead:

1
git config --global alias.today "log --since=midnight --pretty=format:'- %s (%h)'"

Then:

1
git today

Outputs something like:

1
2
3
- Fix login redirect bug (a1b2c3d)
- Add user settings page (d4e5f6a)
- Update Docker compose config (f7g8h9i)

This is useful when you want the summary to stay readable while still allowing people to identify the exact commits.

Check the Alias

To verify that the alias was created correctly, run:

1
git config --global --get alias.today

You should see something like:

1
log --since=midnight --pretty=format:'- %s'

Or, if you included hashes:

1
log --since=midnight --pretty=format:'- %s (%h)'

Remove the Alias

If you ever want to remove it, run:

1
git config --global --unset alias.today

After that, git today will no longer be available.

Final Command

For the cleanest version, use this:

1
git config --global alias.today "log --since=midnight --pretty=format:'- %s'"

Then your daily command becomes:

1
git today

Conclusion

Hard-coding dates in git log works, but it is not a great daily workflow.

By replacing the date range with --since=midnight, formatting the output with --pretty=format:'- %s', and saving the command as a Git alias, you get a simple and reusable shortcut:

1
git today

It is short, memorable, and produces Markdown-ready output that you can paste directly into daily reports, changelogs, pull requests, or team updates.