Justin Alexander Justin Alexander - 3 months ago 12
Git Question

Review code changes by a single contributor?

I realize the best way to manage code reviews is with pull requests. However for reviewing history, I want to be able to review the changes of a single contributor over a period of time; where all the commits are mixed into master already.

How do I do this?

Answer

You might want to take a look at the Commit Limiting section of the git log documentation.

To filter the who:

--author=<pattern>
--committer=<pattern>

Limit the commits output to ones with author/committer header lines that match the specified pattern (regular expression). With more than one --author=, commits whose author matches any of the given patterns are chosen (similarly for multiple --committer=).

To filter the when:

--since=<date>
--after=<date>

Show commits more recent than a specific date.

--until=<date>
--before=<date>

Show commits older than a specific date.

This used together with the -p and you get all the information you might want

-p
-u
--patch

Generate patch (see section on generating patches).