git grep 'TODO'

Category: Git - Core

git grep 'TODO'

Search tracked files for a pattern

Greps the current checkout without touching untracked files, which plain grep cannot distinguish. It is faster than scanning the whole tree because only tracked files are searched. Use -i for case-insensitive matches and -n for line numbers.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.