Reputation: 33
I'm trying to find all commits made by Matt, but in my repository there are a couple of users with similar names (e.g., Matthew), and git log --author="Matt"
covers these users that are not Matt.
Is there a way to say to git do not be that smart and filter only the string that I'm looking for?
Upvotes: 0
Views: 556
Reputation: 2668
If you read this answer carefully, and the git log docs, you could do that either by:
-F
flag (which treats the string as a string to look for, not a pattern), or -E
flag along with a regexpNote that to do that, you have to think of the author
as the full author name, which I believe is the same, that git log without filtering prints.
Using -F flag (I checked it for me and it worked):
$ git log -F --author='Matt <[email protected]>'
Using regexp:
$ git log -E --author='^Matt\s<(.+)>$'
I tested both on my git console, and both worked.
Upvotes: 3