Weird to find tools that take .gitignore as input but also try to detect a git repository before using it. If the file is present obviously someone wanted it there for something... Why is it the tools job to care about git?
This is why .ignore files exist. You can whitelist those subfolders, which will override your .gitignore. Your exact example is in the docs:https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#automatic-filtering …