5

I want to go back in time to the last commit which contained code such as, "ThisClass(object):". That code was subsequently removed from the project in a later commit.

I thought about using git bisect + grep/awk-ing. I've also heard that git grep may allow you to do this sort of thing, though I can't figure out the right command in the man pages.

Any thoughts?

Ben
  • 12,854
  • 10
  • 56
  • 89

1 Answers1

11

Use the -S (search) argument to git log:

git log -S 'ThisClass(object):'
Ethan Brown
  • 25,729
  • 4
  • 77
  • 91