Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| git_searching [2019/02/21 13:56] – [Using the --grep option] rpjday | git_searching [2019/02/21 14:17] (current) – [Config options] rpjday | ||
|---|---|---|---|
| Line 19: | Line 19: | ||
| $ git log --author=" | $ git log --author=" | ||
| $ git log --author=" | $ git log --author=" | ||
| + | $ git log --author=" | ||
| + | 104 | ||
| $ git log -i --author=" | $ git log -i --author=" | ||
| </ | </ | ||
| Line 60: | Line 62: | ||
| </ | </ | ||
| - | Examples: | + | Ignoring case: |
| < | < | ||
| $ git log --grep=" | $ git log --grep=" | ||
| - | 75 | + | 6 |
| $ git log --grep=" | $ git log --grep=" | ||
| - | 75 | + | 9 |
| - | $ git log -i --grep=" | + | $ git log -i --grep=" |
| - | 109 | + | 13 |
| $ | $ | ||
| </ | </ | ||
| + | |||
| + | Specifying AND or OR: | ||
| < | < | ||
| Line 95: | Line 99: | ||
| - Clarify the need for [-l|--llist] | - Clarify the need for [-l|--llist] | ||
| - Some minor rewording | - Some minor rewording | ||
| + | $ | ||
| + | </ | ||
| + | |||
| + | ==== Ignoring merge commits with " | ||
| + | |||
| + | In many cases, merge commits are of no interest since they simply merge commits that produce actual change. | ||
| + | |||
| + | < | ||
| + | $ git log --author=" | ||
| + | 803 | ||
| + | $ git log --author=" | ||
| + | 300 | ||
| + | $ | ||
| + | </ | ||
| + | |||
| + | ===== Searching with "git grep" ===== | ||
| + | |||
| + | ==== DESCRIPTION ==== | ||
| + | |||
| + | < | ||
| + | Look for specified patterns in the tracked files in the work | ||
| + | tree, blobs registered in the index file, or blobs in given | ||
| + | tree objects. Patterns are lists of one or more search | ||
| + | expressions separated by newline characters. An empty string as | ||
| + | search expression matches all lines. | ||
| + | </ | ||
| + | |||
| + | ==== SYNOPSIS ==== | ||
| + | |||
| + | Options: | ||
| + | |||
| + | < | ||
| + | [-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] [--column] | ||
| + | [-l | --files-with-matches] [-L | --files-without-match] | ||
| + | [(-O | --open-files-in-pager) [< | ||
| + | [-z | --null] | ||
| + | [ -o | --only-matching ] [-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] | tree> | ||
| + | [--] [< | ||
| + | </ | ||
| + | |||
| + | ==== Config options ==== | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | See '' | ||
| + | |||
| + | ==== Examples ==== | ||
| + | |||
| + | < | ||
| + | $ git grep -il torvalds | ||
| + | book/ | ||
| + | book/ | ||
| $ | $ | ||
| </ | </ | ||