[Git] Print only the names of files that match git grep

Created on November 30, 2026

You can add --files-with-matches to git grep to print each matching file's path once. This example searches for report in the repository.

git grep --files-with-matches 'report'
Git