6

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
  • 15,010
  • 11
  • 58
  • 90

1 Answers1

12

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

git log -S 'ThisClass(object):'
Ethan Brown
  • 26,892
  • 4
  • 80
  • 92