如何在Github存储库中的特定分支中搜索特定代码? [英] How do I search for specific code in a specific branch in a Github repository?

查看:137
本文介绍了如何在Github存储库中的特定分支中搜索特定代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用Github的高级搜索功能,但是当我搜索"specific text" repo:company/project/tree/specific_branch时,它不会返回所需的结果.似乎只搜索master分支.

I've tried to use the advanced search feature of Github, but when I search "specific text" repo:company/project/tree/specific_branch it does not return the desired results. It only seems to search master branch.

推荐答案

我也在寻找这个.但是根据github帮助,此支持不可用.

I too was looking for this. but this support in not available as per github help.

由于搜索代码的复杂性,对执行搜索的方式存在一些限制:

Due to the complexity of searching code, there are a few restrictions on how searches are performed:

仅考虑默认分支.在大多数情况下,这将是master分支. 仅可搜索小于384 KB的文件. 仅可搜索文件少于500,000的存储库.

Only the default branch is considered. In most cases, this will be the master branch. Only files smaller than 384 KB are searchable. Only repositories with fewer than 500,000 files are searchable.

这篇关于如何在Github存储库中的特定分支中搜索特定代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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