git log --author=<author>

Show commit history filtered to only those made by a specific author.

This command is useful when you want to see only the commits made by a particular person, by filtering the commit history based on the author field recorded in each commit.

This command runs the standard git log history viewer but restricts the output using the --author=<author> filter, which matches commits whose author name or email contains the given string or regular expression; git log by default lists commits in reverse chronological order, showing hashes, authors, dates, and messages, and the --author flag simply narrows that list to commits that match the provided <author> pattern, such as a full name ("Alice Smith") or email ("alice@example.com"). You can combine this filter with other git log options like --oneline to condense each commit to one line, --graph to visualize branching, or --since / --until (or --after / --before) to limit results to a specific time range while still only showing commits from that author.

You can build on this command with variants like git log --author=<author> --oneline for a concise list, git log --author=<author> --stat to also see what files were changed and how many lines were added/removed, or git log --author=<author> -p to show the full diffs for that author’s commits; adding --grep="<text>" lets you filter further by commit message content, and combining with -- <path> (for example -- src/) restricts the results to changes that touched certain files or directories. Other related commands include git shortlog -sne --author=<author> to see a summary of how many commits an author has made, or git blame <file> to see line-by-line authorship in a file, which you can then cross-reference with this command’s filtered history.

Examples:

  • git log --author="Alice"
  • git log --author="alice@example.com"
  • git log --author="Alice" --oneline --since="2 weeks ago"
  • git log --author="Alice" -- src/
Manual page
git log
Related commands

Welcome to GitExamples!

Sign in to gitexamples