$ git grep 'time_t' -- '*.[ch]'
Looks for time_t in all tracked .c and .h files in the working directory and its subdirectories.
$ git grep -e '#define' --and \( -e MAX_PATH -e PATH_MAX \)
Looks for a line that has #define and either MAX_PATH or PATH_MAX.
$ git grep --all-match -e NODE -e Unexpected
Looks for a line that has NODE or Unexpected in files that have lines that match both.
$ git grep solution -- :^Documentation
Looks for solution, excluding files in Documentation.
$ git grep -e 'export' --and \( --not -e 'interface' \) --and \( --not -e 'export type' \) -- ':*.tsx' ':!*.stories.tsx' ':!*.test.tsx'
$ git grep -n 'hogehoge' -- ':*.jsx' ':*.js' ':*.tsx' ':*.ts'
サンプル