git log -Sword
git log -Gword-Gby default accepts a regex, while-Saccepts a string, but it can be modified to accept regexes using the--pickaxe-regex.-Sfinds commits where the number of occurrences of "word" changed, while-Gfinds commits where "word" appears in the diff.- This means that
-S<regex> --pickaxe-regexand-G<regex>do not do exactly the same thing.