How to search in commit messages using command line?

Coderama picture Coderama · Sep 30, 2010 · Viewed 111k times · Source

Possible Duplicate:
How to search through all commits in the repository?

Is there a way to search through commit headers using the command line?

Answer

hobbs picture hobbs · Sep 30, 2010
git log --grep=<pattern>
    Limit the commits output to ones with log message that matches the 
    specified pattern (regular expression).

--git help log