[Git] Search case-insensitively with git grep

Created on November 30, 2026

Use -i or --ignore-case to match text regardless of letter case. Suppose the tracked file sample.txt contains these lines.

Hello
hello
WORLD

Search for hello using -i.

git grep -i 'hello'

The search matches both Hello and hello.

sample.txt:Hello
sample.txt:hello

The long option produces the same result.

git grep --ignore-case 'hello'

Reference

Git