Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (29.3k points)

Is there a way to search through commit headers using the command line?

1 Answer

0 votes
by (50.2k points)

There are two ways for searching the commit messages in the command line;

You could use:

git log --grep=<pattern>

Which limits the commit output to one with a log message that matches the specified pattern.

Or else you could use:

git log --oneline | grep PATTERN

 Both these ways are helpful in search of commit messages using the command line. 

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...