git log --all --format='%T %H %s' | grep 'token'

Category: Git - Advanced

git log --all --format='%T %H %s' | grep 'token'

Search all commit trees for sensitive strings in history

Searches through all commits across all branches for a specific string — useful for finding where a secret was accidentally committed.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.