How to search in commit messages using command line?

GitConsole

Git Problem Overview


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

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

Git Solutions


Solution 1 - Git

git log --grep=<pattern>
    Limit the commits output to ones with log message that matches the 
    specified pattern (regular expression).

--git help log

Solution 2 - Git

git log --oneline | grep PATTERN

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionCoderamaView Question on Stackoverflow
Solution 1 - GithobbsView Answer on Stackoverflow
Solution 2 - GitczchenView Answer on Stackoverflow