How to find commits by a specific user in Git?

102,549

Solution 1

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

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.

Share:
102,549

Related videos on Youtube

user285020
Author by

user285020

Updated on June 02, 2020

Comments

  • user285020
    user285020 about 4 years

    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?

    • user829755
      user829755 about 7 years
      @RobertHarvey you marked this is as duplicate of 4259996 but actually 4259996 is duplicate of this
    • sjas
      sjas almost 7 years
      Possibly this is not a duplicate, if he meant to find the commit contents here (= the actual diffs).
  • Dean Burge
    Dean Burge about 14 years
    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.
  • Amber
    Amber about 14 years
    True. Updated answer to mention both.
  • wisbucky
    wisbucky over 6 years
    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.