If you want to find out the commits that changed a line with a given string:
git log -S string ./file
Eg.
One word: git log -S deleted_method_name ./app/models/accounts/account.rb
Multiple words: git log -S "def deleted_method_name" ./app/models/accounts/account.rb
Use -G for regex pattern matching