Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| git_grep [2018/05/23 19:09] – [Popular options] rpjday | git_grep [2018/05/27 13:30] (current) – [Popular options] rpjday | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| How to use '' | How to use '' | ||
| - | Config options: | + | ===== SYNOPSIS ===== |
| + | |||
| + | < | ||
| + | $ git grep | ||
| + | [-a | --text] [-I] [--textconv] [-i | --ignore-case] [-w | --word-regexp] | ||
| + | [-v | --invert-match] [-h|-H] [--full-name] | ||
| + | [-E | --extended-regexp] [-G | --basic-regexp] | ||
| + | [-P | --perl-regexp] | ||
| + | [-F | --fixed-strings] [-n | --line-number] | ||
| + | [-l | --files-with-matches] [-L | --files-without-match] | ||
| + | [(-O | --open-files-in-pager) [< | ||
| + | [-z | --null] | ||
| + | [-c | --count] [--all-match] [-q | --quiet] | ||
| + | [--max-depth < | ||
| + | [--color[=< | ||
| + | [--break] [--heading] [-p | --show-function] | ||
| + | [-A < | ||
| + | [-W | --function-context] | ||
| + | [--threads < | ||
| + | [-f < | ||
| + | [--and|--or|--not|(|)|-e < | ||
| + | [--recurse-submodules] [--parent-basename < | ||
| + | [ [--[no-]exclude-standard] [--cached | --no-index | --untracked] | < | ||
| + | [--] [< | ||
| + | </ | ||
| + | |||
| + | NOTE: If you don't specify a ''< | ||
| + | |||
| + | ===== Config options | ||
| * '' | * '' | ||
| Line 13: | Line 41: | ||
| ===== Popular options ===== | ===== Popular options ===== | ||
| + | |||
| + | In addition to many standard '' | ||
| < | < | ||
| Line 18: | Line 48: | ||
| Instead of searching tracked files in the working tree, search | Instead of searching tracked files in the working tree, search | ||
| blobs registered in the index file. | blobs registered in the index file. | ||
| - | |||
| - | --no-index | ||
| - | Search files in the current directory that is not managed by Git. | ||
| --untracked | --untracked | ||
| Line 29: | Line 56: | ||
| Also search in ignored files by not honoring the .gitignore | Also search in ignored files by not honoring the .gitignore | ||
| mechanism. Only useful with --untracked. | mechanism. Only useful with --untracked. | ||
| - | |||
| - | --exclude-standard | ||
| - | Do not pay attention to ignored files specified via the | ||
| - | .gitignore mechanism. Only useful when searching files in the | ||
| - | current directory with --no-index. | ||
| </ | </ | ||
| ===== Examples ===== | ===== Examples ===== | ||
| + | |||
| + | Search a subdirectory: | ||
| < | < | ||