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