Git search for string in a single file’s history

So if I have a file called foo.rb and it is giving me an error for a missing method called bar, so I want to search the history of foo.rb for the string bar to see if it was ever defined in the past.

I found this Search all of Git history for a string?

But this searches all files. I just want to search in one file.

5 Answers
5

Leave a Comment