? , ? , . . git log:
-S<string>
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 details.
, public class Foo {, , :
git log -S"public class Foo"
, --:
git log -S"public class Foo" -- Foo.java
, :
git log -S<string> [-- <file>]