DEV Community

Discussion on: Find A String in a Massive Git Repo

Collapse
 
pzelnip profile image
Adam Parkin

You might want to check out the options on the git log command as well, as it can be used to search across all history rather than just all current branches. For example to search all commit messages for the string "foo bar baz":

git log --grep="foo bar baz"
Enter fullscreen mode Exit fullscreen mode

If you want to search file contents, you can use the "pickaxe". Not sure how you do multiple words, but for the single word "foo":

git log -Sfoo
Enter fullscreen mode Exit fullscreen mode

This will search all commits for the word "foo" being added or removed.

Collapse
 
dougblackjr profile image
Doug Black

Awesome! Thank you!