Skip to content
The Git Crypt

/static/cripta/en/ossada/log-s/

Menu

GIT-007 · Archaeology

git log -S

The pickaxe: finds the commit where an expression was born or died.

The documentation calls it the pickaxe: -S only shows commits where the number of occurrences of the piece changed — where it was created, duplicated or removed. Commits that merely moved the line around don't pollute the result.

It is the question blame cannot answer: blame finds who touched the line that exists; the pickaxe finds who deleted the one that no longer does, or who introduced the function you are hunting by name.

$ git log -S 'fatiaTitulo' --oneline
9c2d4e1 helpers: extrai fatiaTitulo do template
3a8b7f2 templates: título fatiado no sub-artigo
The two commits where the name entered the codebase.