How to find commits by a specific user in Git?

GitVersion ControlCommit

Git Problem Overview


Our project uses Git as the version control system and recently I needed to review someone's commits. How can I see a list of commits made by a specific user?

Git Solutions


Solution 1 - Git

git log --author=<pattern> will show the commit log filtered for a particular author. (--committer can be used for committer if the distinction is necessary).

http://git-scm.com/docs/git-log

Solution 2 - Git

Try this:

git log --author=<name or email>

or pass the same option to gitk, or if already in gitk, go to view > new view, and fill in the appropriate field. The name doesn't have to be exact; it's matched as a regex (a substring, in the trivial case) against the author field.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser285020View Question on Stackoverflow
Solution 1 - GitAmberView Answer on Stackoverflow
Solution 2 - GitCascabelView Answer on Stackoverflow