git log is the universal search tool. The trick is stacking filters until the result set is small enough to read.
The useful axes:
--grep="pattern" — search commit messages (regex by default).
--author="alice" — match author name/email substring.
--committer="..." — separate from author (rebases set committer ≠ author).
--since="2 weeks ago", --until="2026-05-01" — time window.
--all — every ref, not just current branch.
--source — show which ref each commit was found on.
-- <path> — restrict to commits touching this path.
--no-merges — strip merge commits from the result.
-i — case-insensitive grep.
Compose them like SQL filters. "Auth changes by Alice in May that touched the OAuth file":
git log --all --author="alice" \
--since="2026-05-01" --until="2026-06-01" \
--grep="oauth" -i \
-- src/auth/oauth.ts
Common triangulation recipes:
"Which PR introduced this feature?" — --grep for the ticket ID or feature name, restrict to merges:
git log --merges --grep="JIRA-1234"
"What did this contractor touch last quarter?" — author + time window + paths:
git log --author="contractor@" --since="3 months ago" --name-only
"Find work on a deleted branch" — --all doesn't include unreachable commits, but if the ref still exists in reflog or remote:
git log --all --source --grep="experimental-feature"
For exploring rather than searching, pair with --oneline --graph --decorate to keep the output readable. When you've narrowed to a handful of candidates, switch to -p to read the actual diffs.