Possible Duplicate:
How to search through all commits in the repository?
Is there a way to search through commit headers using the command line?
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 log --grep=<pattern>
Limit the commits output to ones with log message that matches the
specified pattern (regular expression).
from git help log
.
--grep
option searches the whole commit message, instead of just the header. @czchen's answer is more correct, in this case.
Commented
Oct 10, 2013 at 18:53
git log --oneline | grep PATTERN
grep
, combine both answers: git log --oneline --grep=PATTERN
Commented
Apr 30, 2019 at 13:21
git log --oneline | grep PATTERN -i
Commented
Feb 20 at 6:26
--all
to search in non-ancestor commits :}