188

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?

Alconja
  • 14,696
  • 3
  • 59
  • 61
user285020
  • 2,693
  • 4
  • 21
  • 17
  • 3
    @RobertHarvey you marked this is as duplicate of 4259996 but actually 4259996 is duplicate of this – user829755 May 17 '17 at 08:42
  • Possibly this is not a duplicate, if he meant to find the commit contents here (= the actual diffs). – sjas Sep 17 '17 at 15:09

2 Answers2

212

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

Amber
  • 477,764
  • 81
  • 611
  • 541
  • 11
    You mean author. `--committer` is for the committer. The two are different if, for example, the commit is from a patch sent by email. Then the committer (a maintainer) and the author are two different people. – wilhelmtell Jun 02 '10 at 02:16
  • 2
    True. Updated answer to mention both. – Amber Jun 02 '10 at 03:26
95

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.

Cascabel
  • 451,903
  • 67
  • 363
  • 314
  • 1
    Just note that if do this in `gitk`, it will also show the parent commit for context (the white circles). You can't change that behavior AFAIK. – wisbucky Nov 16 '17 at 18:32