Git provides a simple way to find out where some code was modified or removed from your codebase. You can use git bisect
for that and the processes can be completely automated.
As example I will try to find out when the method send_email_notification
was removed from the file app/models/person.rb
.
So you have to create a automated bash file, or other kind of script, that should return 0
when the method is found and 1
otherwise. So git can run this script for each commit until it returns 1
, which means that the method was removed in that commit. There's the script we gonna use:
if [[ `cat app/models/person.rb | grep send_email_notification` ]]; then