Is it possible for Git to search the contents of the text files in a bare repository for a specific string?
I'm building a search feature for WebGit .NET to allow for searching the current state of all repositories for text.
It sounds like you're looking for git grep
. When searching a bare repository, you must specify somewhere to search:
git grep foobar HEAD
Something like that?
git grep -e textstring HEAD
or
git ls-files|xargs -I% -n 1 git cat-file -p HEAD:%|grep textstring
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With