I have deleted a file or some code in a file sometime in the past. Can I grep in the content (not in the commit messages)?
A very poor solution is to grep the log:>
Adding more to the answers already present. If you know the file in which you might have made do this:
git log --follow -p -S 'search-string'
--follow: lists the history of a file