Title: Theory / Important / CS / Softw / VCS / Git / Grep
Tags: fromMath mathToDef instruction_to_flag seen_description
On every note of this deck, unless a note says otherwise:
Page: https://git-scm.com/book/en/v2/Git-Tools-Searching

Fla: --line-number
Prefix: git grep
Flag abbreviation: -n
Chapter: 7
Section: 6
Print: display line number

Fla: grep -e foo
Effect: show all lines containing "foo" in the current working tree
Prefix: git
Chapter: 7
Section: 6

Fla: --count
Prefix: git grep foo
Flag abbreviation: -c
Chapter: 7
Section: 6
Print: Print a single line by file, indicating how many time "foo" appear in each

Fla: --show-function
Prefix: git grep foo
Flag abbreviation: -p
Chapter: 7
Section: 6
Print: Before each match, print the function in which the matc was found

Fla: --break
Prefix: git grep foo
Chapter: 7
Section: 6
Print: add an extra line between each file's output

Fla: --header
Prefix: git grep foo
Chapter: 7
Section: 6
Print: List the file name, then the list of match without repeating file name, for more readability.
v1.8.0:cache.h
73:#define S_IFGITLINK  0160000
74:#define S_ISGITLINK(m)       (((m) & S_IFMT) == S_IFGITLINK)

Fla: commitRef
Effect: do the search in commit at commitRef
Prefix: git grep foo
Chapter: 7
Section: 6

Fla: --and bar
Effect: limit searched lines to those also satisfying bar
Prefix: git grep foo
Chapter: 7
Section: 6

Fla: grep foo
Effect: short for
grep -e foo
Prefix: git
Chapter: 7
Section: 6

Fla: grep
Effect: todo
Page: https://git-scm.com/docs/git-grep