• 0

Search git commit messages for a word

You always want to write meaningful commit messages that help you figure out things later. Sometimes I use start my commit message with the string ‘wip’ which stands for work in progress and to me, means that the commit contains breaking changes. Another practice is to include a bug number in the commit. This allows you to later search your commit logs for the bug or whaterver term you are looking for using the following command

git log --grep=searchTerm --oneline

That gives you a simple list of one line logs of all the commit messages that had the search term that you specified. Try it out!