GitCheatSheet.org logo
Home / How To

Filter the log entries by commit message containing a string

Searching for the text "hello" in commit messages:

git log --grep="hello" -i

Note: The "-i" option is for case-insensitive search. You can also ad --oneline to make the log more compact.