git-grep

Find strings inside files anywhere in a repository's history.
Accepts a lot of the same flags as regular `grep`.
More information.
git grep {search_string}
git grep {search_string} -- {file_glob_pattern}
git grep --recurse-submodules {search_string}
git grep {search_string} {HEAD~2}
git grep {search_string} $(git rev-list --all)
Copyright © 2014—present the tldr-pages team and contributors.
This work is licensed under the Creative Commons Attribution 4.0 International License (CC-BY).
CC-BY