GitHub按内容查找文件 [英] GitHub Find file by its content

查看:60
本文介绍了GitHub按内容查找文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以按文件内容过滤GitHub存储库中的文件吗?

Can I filter files in a GitHub repository by file content?

例如,有一个公共仓库:

For example, there is the public repo:

https://github.com/xamarin/mobile-samples .

我知道我可以使用以下选项按名称查找文件:

I know that I can find file by name using this option:

https://github.com/xamarin/mobile-samples/find/master

但是,我可以将结果过滤到包含指定文本的文件吗?条目"?

But, can I filter results to files containing specified text eg. "Entry"?

有一些查询字符串可以用来做吗?

Is there some query-string which I can use to do that?

我的意思是这样的: https://github.com/xamarin/mobile-samples ?content = entry

I mean something like this: https://github.com/xamarin/mobile-samples?content=entry

推荐答案

只需打开存储库,转到顶部的搜索栏(在其中搜索其他存储库)并输入:

Just open repository, go to top search bar (where you search for other repos) and type:

条目

选择要在当前存储库中搜索,而不是在所有GitHub" 中搜索.

Select to search in current repository, not "All GitHub".

要在存储库类型的特定文件中搜索术语:

To search for term in particular file of repository type:

条目文件名:example_filename.java

Entry filename:example_filename.java

它将显示特定文件中的所有条目".

It will display all "Entry" in particular file.

这篇关于GitHub按内容查找文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆