git log(1) -S 'mysteryString' -- file.ext
Show commit logs
    Look for differences that introduce or remove an instance of <string>. Note that this is different
    than the string simply appearing in diff output; see the pickaxe entry in gitdiffcore(7) for more
    Show only commits between the named two commits. When either <since> or <until> is omitted, it
    defaults to HEAD, i.e. the tip of the current branch. For a more complete list of ways to spell
    <since> and <until>, see gitrevisions(7).

[--] <path>...
    Show only commits that are enough to explain how the files that match the specified paths came to be.
    See "History Simplification" below for details and other simplification modes.

    To prevent confusion with options and branch names, paths may need to be prefixed with "-- " to
    separate them from options or refnames.
source manpages: git-log