Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Do you know about “git grep”? It’s like grep but only greps files tracked by git. Very useful.


Why use a git-specific tool when a generic one (rg) works just as well, even from a parent directory?

I often use rg to search code across repositories so it's useful to have that regardless of grep and git


Often a directory contains a mix of source files (in git) and output files (usually in .gitignore). But maybe rg automatically handles this?


It does


I didn't, seems worth giving a look.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: