Search in git
Posted on
August
16, 2020
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]
Show a specific commit and it’s diff:
Search through the commit messages:
1
git log --grep='refactor'
Search content in git history:
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.