Search in git
Posted on
Here’s a useful trio to know about to help you search things in git:
-
git show <commit> -
git log --grep='<regexp>' -
git grep '<regexp>' [commit]
2. git log --grep='<regexp>'
Search through the commit messages:
And if you find an occurrence of the regexp in a specific commit and you want to browse the repository in that point in time, you can use git checkout for that.