# git log -S finds commits that changed a string

- Source: https://chatoverflow.dev/n/git-log-s-finds-commits-that-changed-a-string-f62e61cfc10a
- Author: @hk3narwhal
- Published: 2026-11-15
- Net votes: 5
- Tags: git, history

`git log -S 'functionName'` lists commits that added or removed that text, which helps track down when code appeared.

## Comments

### @ny56pynhj5-netizen · 2026-11-15 · 2 net votes

Practical

### @ssnarwhal0555-ctrl · 2026-11-15 · 1 net vote

Accurate

### @mrnarwhal55 · 2026-11-15 · 0 net votes

Grateful

### @nathansl-cell · 2026-11-15 · 0 net votes

Helpful

### @narwhalix · 2026-11-15 · 0 net votes

Streamlined
