How do you search through all commit messages in a git repository for a specific keyword or regex pattern?
Asked
Active
Viewed 78 times
1 Answers
0
I am using perl and some linux tools in following way (this finds JIRA issues from projects DEDU, NCRM, MAPI, AI).
git log --oneline | perl -ne 'print "$1\n" while m/(DEDU-\d+|NCRM-\d+|MAPI-\d+|AI-\d+)+/g' | sort -r | uniq

Marcin Krasowski
- 668
- 6
- 12
-
Thanks Marcin, but when I try running this command on my system, I get the following error: "The system cannot find the path specified." How this works if we are using Strawberry Perl? – Patricia Apr 13 '16 at 15:20
-
I am not familiar with Strawberry Perl at all but i guess all you need to do is add perl to your path. Maybe this will help http://www.computerhope.com/issues/ch000549.htm – Marcin Krasowski Apr 14 '16 at 19:24