mirror of
https://github.com/tiimgreen/github-cheat-sheet.git
synced 2025-08-11 02:14:04 +02:00
27
README.md
27
README.md
@@ -59,6 +59,7 @@ A collection of cool hidden and not so hidden features of Git and GitHub. This c
|
||||
- [Styled Git Status](#styled-git-status)
|
||||
- [Styled Git Log](#styled-git-log)
|
||||
- [Git Query](#git-query)
|
||||
- [Git Grep](#git-grep)
|
||||
- [Merged Branches](#merged-branches)
|
||||
- [Fixup and Autosquash](#fixup-and-autosquash)
|
||||
- [Web Server for Browsing Local Repositories](#web-server-for-browsing-local-repositories)
|
||||
@@ -786,6 +787,32 @@ $ git show :/typo
|
||||
|
||||
*Press `q` to quit.*
|
||||
|
||||
|
||||
### Git Grep
|
||||
Grep pattern under your git versioned folder.
|
||||
|
||||
Running:
|
||||
```
|
||||
git grep aliases
|
||||
```
|
||||
will show all the files containing the string *aliases*.
|
||||
|
||||

|
||||
|
||||
*Press `q` to quit.*
|
||||
|
||||
We can also use multiple flags for more advanced search. For example:
|
||||
|
||||
* `-e` The next parameter is the pattern (including regex)
|
||||
* `--and` Combine multiple patterns.
|
||||
|
||||
Use it like this:
|
||||
```
|
||||
git grep -e pattern --and -e anotherpattern
|
||||
```
|
||||
|
||||
[*Read more about the Git `grep` command.*](http://git-scm.com/docs/git-grep)
|
||||
|
||||
### Merged Branches
|
||||
Running:
|
||||
|
||||
|
Reference in New Issue
Block a user