Ответ 1

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

- git журнал справки

Ответ 2

git log --oneline | grep PATTERN