Git Basics8 min readMarch 10, 2026

Git Commit List: How to List, Filter, and Format Commits

Master git log to list commits by author, date, file, and message. Practical examples for every filtering and formatting scenario.

List All Commits

The most basic way to see your commit list is git log. It shows commits in reverse chronological order — newest first — with the full hash, author, date, and message.

git log

For a condensed view, use --oneline to collapse each commit to a single line with an abbreviated hash and the first line of the message. This is usually what you want when scanning history quickly.

git log --oneline

Filter Commits by Author

Use --author to filter commits by the person who made them. This is a regex match against the author name or email, so partial matches work.

# Commits by a specific author
git log --author="Jane"

# Combine with --oneline for a quick list
git log --oneline --author="jane@example.com"

This is especially useful when you want to review your own work before a standup or weekly recap. Git Progress automates this across all your repos so you never have to run these commands manually.

Filter Commits by Date

The --since and --until flags accept dates in multiple formats: ISO dates, relative dates, or natural language.

# Commits from the last week
git log --since="1 week ago"

# Commits in a date range
git log --since="2026-01-01" --until="2026-02-01"

# Combine with author
git log --oneline --author="Jane" --since="last Monday"

List Commits That Changed a Specific File

Pass a file path after -- to see only commits that touched that file. This is invaluable when debugging regressions.

# Commits that changed a specific file
git log --oneline -- src/auth/login.ts

# Show the actual diff for each commit
git log -p -- src/auth/login.ts

Search Commit Messages

The --grep flag searches commit messages. Combine it with -i for case-insensitive search.

# Find commits mentioning "fix"
git log --oneline --grep="fix"

# Case-insensitive search
git log --oneline --grep="auth" -i

Custom Output Formats

The --pretty=format flag gives you full control over what fields appear and how they are formatted. Here are the most useful placeholders:

  • %h — abbreviated commit hash
  • %an — author name
  • %ae — author email
  • %ar — relative date (e.g., "2 days ago")
  • %s — commit subject (first line of message)
# Compact custom format
git log --pretty=format:"%h %ar %an: %s"

# CSV-friendly output
git log --pretty=format:"%H,%an,%ae,%ai,%s"

If you find yourself running these commands regularly, Git Progress can generate these summaries automatically across all your repositories — no terminal required.

Stop running git log manually

Git Progress aggregates your commit history across GitHub, GitLab, and Bitbucket into beautiful dashboards. Free for individual developers.

Get Started Free