【发布时间】:2019-07-19 12:24:25
【问题描述】:
我想搜索位于远程存储库 (origin/master) 的子树之一中的文件的内容。
git-grep 文档说该命令适用于当前工作树。因此,如何搜索构成远程 repo 树的文件?
【问题讨论】:
标签: git grep repository git-grep
我想搜索位于远程存储库 (origin/master) 的子树之一中的文件的内容。
git-grep 文档说该命令适用于当前工作树。因此,如何搜索构成远程 repo 树的文件?
【问题讨论】:
标签: git grep repository git-grep
在 git 中没有办法。您要么在本地获取远程提交,要么使用 out-of-git 访问远程存储库。使用 ssh,您只需执行 ssh remote-host "cd /repo && git grep"。通过网络访问使用提供的任何搜索。
【讨论】: