GitHub高級篩選小白使用手冊
GitHub 提供了強大的搜索功能,允許用戶通過高級篩選器來精確查找倉庫、Issues、Pull Requests、代碼等。下面是一些常用的高級篩選用法,幫助你更高效地使用 GitHub 搜索功能。
目錄
- 搜索倉庫
- 搜索Issues
- 搜索Pull Requests
- 搜索代碼
- 搜索README
搜索倉庫
按名稱搜索
repo:owner/repo
示例:搜索名為 tensorflow
的倉庫
repo:tensorflow/tensorflow
按主題搜索
topic:topic_name
示例:搜索所有與 machine-learning
相關的倉庫
topic:machine-learning
按語言搜索
language:language_name
示例:搜索所有用 Python 編寫的倉庫
language:Python
綜合示例
搜索所有與 machine-learning
相關且用 Python 編寫的倉庫
topic:machine-learning language:Python
搜索Issues
搜索特定倉庫中的Issues
repo:owner/repo is:issue
示例:搜索 tensorflow/tensorflow
倉庫中的所有Issues
repo:tensorflow/tensorflow is:issue
按狀態搜索
is:open 或 is:closed
示例:搜索所有打開的Issues
is:issue is:open
按標簽搜索
label:label_name
示例:搜索所有帶有 bug
標簽的Issues
is:issue label:bug
綜合示例
搜索 tensorflow/tensorflow
倉庫中所有打開的、帶有 bug
標簽的Issues
repo:tensorflow/tensorflow is:issue is:open label:bug
搜索Pull Requests
搜索特定倉庫中的Pull Requests
repo:owner/repo is:pr
示例:搜索 tensorflow/tensorflow
倉庫中的所有Pull Requests
repo:tensorflow/tensorflow is:pr
按狀態搜索
is:open 或 is:closed 或 is:merged
示例:搜索所有已合并的Pull Requests
is:pr is:merged
按作者搜索
author:username
示例:搜索所有由用戶 octocat
創建的Pull Requests
is:pr author:octocat
綜合示例
搜索 tensorflow/tensorflow
倉庫中所有由用戶 octocat
創建的、已合并的Pull Requests
repo:tensorflow/tensorflow is:pr is:merged author:octocat
搜索代碼
搜索特定倉庫中的代碼
repo:owner/repo path:/path/to/file
示例:搜索 tensorflow/tensorflow
倉庫中所有包含 import numpy
的代碼
repo:tensorflow/tensorflow "import numpy"
按語言搜索
language:language_name
示例:搜索所有用 Python 編寫的、包含 import numpy
的代碼
language:Python "import numpy"
綜合示例
搜索 tensorflow/tensorflow
倉庫中所有用 Python 編寫的、包含 import numpy
的代碼
repo:tensorflow/tensorflow language:Python "import numpy"
搜索README
按內容搜索README文件
in:readme search_term
示例:搜索所有 README 文件中包含 machine learning
的倉庫
in:readme "machine learning"
綜合示例
搜索 tensorflow/tensorflow
倉庫中 README 文件中包含 machine learning
的內容
repo:tensorflow/tensorflow in:readme "machine learning"
通過這些高級篩選器,你可以更快速、更準確地找到你需要的內容。