在特定的GitHub分支中搜索代码 [英] Searching code in a specific GitHub branch
本文介绍了在特定的GitHub分支中搜索代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在GitHub存储库的分支中搜索一些代码.
I am trying to search some code in a branch in a GitHub repository.
但是此表示我只能搜索默认分支.
However this indicates that I can only search the default branch.
是否可以在GitHub存储库中的非默认分支中搜索代码?
Is there a way I can search code in non-default branch in my GitHub repository?
推荐答案
Not from the GitHub web interface itself, as mentioned in "How can I search for a commit message on GitHub?": only the default branch (generally master
) is indexed.
您最好的选择是克隆存储库,然后在其中搜索所有分支(例如,以 git log -S
).
Your best bet is to clone the repository, and there, search in all branches (with git log -S
for instance).
这篇关于在特定的GitHub分支中搜索代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文