blob: bf4b592f48d60836a624bb399c65ffd4b1b55ee6 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-grep(1)
2===========
3
4NAME
5----
6git-grep - print lines matching a pattern
7
8
9SYNOPSIS
10--------
Junio C Hamanoa6331a82006-01-22 07:50:3311'git-grep' [<option>...] [-e] <pattern> [--] [<path>...]
Junio C Hamano1a4e8412005-12-27 08:17:2312
13DESCRIPTION
14-----------
15Searches list of files `git-ls-files` produces for lines
16containing a match to the given pattern.
17
18
19OPTIONS
20-------
Junio C Hamanoa6331a82006-01-22 07:50:3321`--`::
22Signals the end of options; the rest of the parameters
23are <path> limiters.
24
Junio C Hamano1a4e8412005-12-27 08:17:2325<option>...::
26Either an option to pass to `grep` or `git-ls-files`.
Junio C Hamanoa6331a82006-01-22 07:50:3327
28The following are the specific `git-ls-files` options
29that may be given: `-o`, `--cached`, `--deleted`, `--others`,
30`--killed`, `--ignored`, `--modified`, `--exclude=*`,
31`--exclude-from=*`, and `--exclude-per-directory=*`.
32
33All other options will be passed to `grep`.
Junio C Hamano1a4e8412005-12-27 08:17:2334
35<pattern>::
Junio C Hamanoa6331a82006-01-22 07:50:3336The pattern to look for. The first non option is taken
37as the pattern; if your pattern begins with a dash, use
38`-e <pattern>`.
Junio C Hamano1a4e8412005-12-27 08:17:2339
40<path>...::
Junio C Hamano1a4e8412005-12-27 08:17:2341Optional paths to limit the set of files to be searched;
42passed to `git-ls-files`.
43
44
45Author
46------
47Written by Linus Torvalds <torvalds@osdl.org>
48
49Documentation
50--------------
51Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
52
53GIT
54---
55Part of the gitlink:git[7] suite
56