0

I have done some rebasing of a certain branch of mine, and at some point I seem to have lost a few lines in one of my files. I have a search-string for these lines; and I have the name of my file within the repository (it hasn't moved around).

How can I search all past versions (or all versions from the past few months) of that file, for the string?

As for matches - I need the commit IDs of the versions of the file which match the string. If that's difficult to do, then the matched lines would already be useful.

einpoklum
  • 118,144
  • 57
  • 340
  • 684
  • I was going to suggest doing `git log -p ` and searching in less for the string, but the accepted answer to the duplicate is way better! – joanis Oct 08 '22 at 21:46

0 Answers0