Skip to content
The Git Crypt

/static/cripta/en/ossada/log-g/

Menu

GIT-008 · Archaeology

git log -G

The fine sieve: a regex over the diff, where the pickaxe can't reach.

While -S counts occurrences of a fixed text, -G takes a regular expression and shows every commit whose diff has an added or removed line matching it — even when the total count didn't change, as in a line that was merely edited.

It is the tool for hunting patterns, not names: every change that touched template.Must, every commit that reshaped a call with a certain argument shape. Slower than the pickaxe, and more thorough.

$ git log -G 'template\.Must' --oneline
5e2c8b1 main: templates carregados uma vez só
c4a9d27 main: primeiro esboço do servidor
Every commit that touched the pattern, edits included.