git log -S --source --all is to find the Git commit that introduced a string in a branch.
git log -S --source --all
Here is a popular and helpful link How to find