Optional --after-Shows the specified number of trailing lines, and places a line containing -- between contiguous groups of matches.
See also --before-context and --context.
Optional --all-When multiple pattern expressions are combined with or, this flag limits the match to files that have lines to match all of them.
Optional --before-Shows the specified number of leading lines, and places a line containing -- between contiguous groups of matches.
See also --after-context and --context.
Optional --breakPrints an empty line between matches from different files.
Optional --cachedSearches blobs in the index.
Optional --columnPrefixes the 1-indexed byte-offset of the first match from the start of the matching line.
Optional --contextShows the specified number of leading and trailing lines, and places a line containing -- between contiguous groups of matches.
See also --after-context and --before-context.
Optional --countShows the number of lines that match, instead of showing every matched line.
Optional --exclude-Does not pay attention to ignored files specified via the .gitignore mechanism. Only useful with --no-index. See also --no-exclude-standard.
Optional --files-Shows only the names of files that contain matches. See also --files-without-match.
Optional --files-Shows only the names of files that do not contain matches. See also --files-with-matches.
Optional --fixed-Doesn’t interpret the pattern as a regex.
Optional --function-Shows the surrounding text from the previous line containing a function name up to the one before the next function name, effectively showing the whole function in which the match was found.
Optional --headingShows the filename above the matches in that file instead of at the start of each shown line.
Optional --ignore-Ignores case differences between the patterns and the files.
Optional --invert-Selects non-matching lines.
Optional --line-Prefixes the line number to matching lines.
Optional --max-Limits the number of matches per file.
Optional --max-Descends at most the specified number of directory levels. A value of -1 means no limit.
Optional --no-Searches ignored files by not honoring the .gitignore mechanism. Only useful with --untracked. See also --exclude-standard.
Optional --no-Searches files in the current directory that is not managed by Git.
Optional --no-Same as --max-depth=0. See also --recursive.
Optional --no-Does not honor textconv filter settings. See also --textconv.
Optional --only-Prints only the matched (non-empty) parts of a matching line, with each such part on a separate output line.
Optional --quietDoes not output matched lines; instead, exits with status 0 when there is a match and with non-zero status when there isn’t.
Optional --recurse-Recursively searches in each submodule that is active and checked out in the repository.
Optional --recursiveSame as --max-depth=-1; this is the default. See also --no-recursive.
Optional --show-Shows the preceding line that contains the function name of the match, unless the matching line is a function name itself.
Optional --textProcesses binary files as if they were text.
Optional --textconvHonors textconv filter settings. See also --no-textconv.
Optional --threadsSpecifies the number of grep worker threads to use.
Optional --untrackedSearches also in untracked files.
Optional --word-Matches the pattern only at word boundary.
Optional -IDoesn’t match the pattern in binary files.
Optional -eSpecifies the pattern. Multiple patterns are combined by or.
See also --all-match.
Optional -hSuppresses the output of the filename for each match.
Optional -zUsees \0 as the delimiter for pathnames in the output and prints them verbatim.
GrepOptions defines the supported options for the Git grep command.