sajad torkamani
On this page

Syntax

git log -g --grep=<message>

Example

Search all commits across all branches (thanks to -g) where the commit message has the string bugfix:

git log -g --grep=bugfix