Peter Bengtsson Peter Bengtsson - 1 year ago 129
Git Question

git grep to find files

I love

git grep
to search in all files checked in to a repo. It's great. But is it possible to use it (or some other git command) to just use to find files (independent of content)?

At the moment I do this:

$ find . | grep middleware

which works but it's not using the git index which means it's going through every found file and it reports on files that are matching the

Any ideas for clever tricks?

Answer Source

Maybe you want git ls-files which lists the files in the index? (and automatically adjusts for your current directory inside the git work directory)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download