Reputation: 1015
I want to search commits in my repository and find ones that contain 2 specific words in their commit messages (say, wordA AND wordB). How can I do that?
Upvotes: 3
Views: 619
Reputation: 7926
If the words must go together, just put them between "
git log --grep "wordA wordB"
If they are not together but the order is always the same you can do this with a regex:
git log --grep "wordA.*wordB"
Upvotes: 4