Skip to content

Commit 3aba3c0

Browse files
committed
Update Git Grep section
1 parent ea37025 commit 3aba3c0

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -789,26 +789,27 @@ $ git show :/typo
789789

790790

791791
### Git Grep
792-
Grep pattern under your git versioned folder.
792+
793+
Git Grep will return a list of lines matching a pattern.
793794

794795
Running:
795-
```
796-
git grep aliases
796+
```bash
797+
$ git grep aliases
797798
```
798799
will show all the files containing the string *aliases*.
799800

800-
![git grep aliases](http://i.imgur.com/q3WkUgl.png?1)
801+
![git grep aliases](http://i.imgur.com/DL2zpQ9.png)
801802

802803
*Press `q` to quit.*
803804

804-
We can also use multiple flags for more advanced search. For example:
805+
You can also use multiple flags for more advanced search. For example:
805806

806-
* `-e` The next parameter is the pattern (including regex)
807-
* `--and` Combine multiple patterns.
807+
* `-e` The next parameter is the pattern (e.g. regex)
808+
* `--and`, `--or` and `--not` Combine multiple patterns.
808809

809810
Use it like this:
810-
```
811-
git grep -e pattern --and -e anotherpattern
811+
```bash
812+
$ git grep -e pattern --and -e anotherpattern
812813
```
813814

814815
[*Read more about the Git `grep` command.*](http://git-scm.com/docs/git-grep)

0 commit comments

Comments
 (0)