I would like to search the contents of files located in one of subtrees of the remote repository (origin/master).
git-grep
documentation says that command works on a current working tree. Consequently, how can I search through files that make up remote repo tree?
There is no way in git. Either you fetch the remote commits locally or use out-of-git access to the remote repository. With ssh you just do ssh remote-host "cd /repo && git grep"
. With web access use whatever search is provided.