HowtoGit: ajouter git grep

This commit is contained in:
Alexis Ben Miloud--Josselin 2023-08-31 15:23:40 +02:00
parent 9b43868858
commit ff2da1f040

View file

@ -662,6 +662,17 @@ Changer un tag foo en bar sur un dépôt distant :
$ git co foo && git tag bar && git tag -d foo && git push origin :foo && git push --tags
~~~
### `git grep`
Faire une recherche comme le ferait `grep`, mais sans parcourir le répertoire `.git` :
~~~
$ git grep 'hel\+o there'
$ git grep -E 'hel+o there'
$ git grep 'regexp' répertoire/
$ git grep 'regexp' :^répertoire-à-ignorer/
~~~
### .git/config
<https://git-scm.com/docs/git-config>