Git logs, find where it went wrong

When I want to find something in GIT and see who and when removed some code I start to search GIT, best command combo is this.

 git log -S "$location['country_code']" -p

For current branch

 git log -S "$location['country_code']" -p --all

For all the branches
With this you get full commit code info, so you can see what was added and removed, so you will have proper context.
$location['country_code'] is some array value I am looking up in examples above.

If you want to get to know in which branch was something made, use this


 git branch --contains cdd7128473b229c9326d23c89de8662cb4363fc3

Where you input git log ID (obtained with git command before) and you will get a branch). Happy hunting :)