Search codebase history using git log -S

The -S flag for git log lets you search the entire repo history and check if a given string was ever present.

Example: git log -p -S"string_to_search" --source --all

-p: Adds the diff.

--source: Includes the ref (branch or tag) in which string_to_search was added or removed.

--all: Include all branches and tags.