Github – How to search for a commit message on GitHub


Not in a Git repository, but rather in GitHub specifically – how do I search just the commit messages of a specific repository/branch?

Best Solution

You used to be able to do this, but GitHub removed this feature at some point mid-2013. To achieve this locally, you can do:

git log -g --grep=STRING

(Use the -g flag if you want to search other branches and dangling commits.)

-g, --walk-reflogs
    Instead of walking the commit ancestry chain, walk reflog entries from
    the most recent one to older ones.