GitHub 全体にわたってグローバルにコミットを検索できます。あるいは、特定のリポジトリや organization 内のコミットも検索もできます。 詳しくは、「GitHubでの検索について」をご覧ください。
コミットを検索すると、リポジトリの既定のブランチのみが検索されます。
ヒント
- この記事には、GitHub.com の Web サイトでの検索例へのリンクが含まれていますが、同じ検索フィルターはあらゆる GitHub プラットフォームで使えます。 リンクされている検索例で、
github.comを GitHub プラットフォームのホスト名に置き換えてください。 - 検索結果をさらに改善するために検索修飾子を追加できる検索構文の一覧については、「検索構文を理解する」を参照してください。
- 複数単語の検索用語は引用符で囲みます。 たとえば "In progress" というラベルの問題を検索したい場合は、
label:"in progress"と検索します。 検索では、大文字と小文字は区別されません。
コミットメッセージ内を検索
メッセージに特定の単語を含むコミットを検索できます。 たとえば、fix typo は、「fix」と「typo」という単語を含むコミットにマッチします。
著者またはコミッターで検索
author や committer の修飾子を使用すると、特定のユーザーによるコミットを発見できます。
| 修飾子 | 例 |
|---|---|
author:USERNAME | |
| [ | |
| author:defunkt](https://github.com/search?q=author%3Adefunkt&type=Commits) は、@defunkt が作成したコミットとマッチします。 | |
committer:USERNAME | |
| [ | |
| committer:defunkt](https://github.com/search?q=committer%3Adefunkt&type=Commits) は、@defunkt がコミットしたコミットとマッチします。 |
author-name と committer-name の修飾子は、作成者またはコミッターの名前によるコミットとマッチします。
| 修飾子 | 例 |
|---|---|
author-name:NAME | |
| [ | |
| author-name:wanstrath](https://github.com/search?q=author-name%3Awanstrath&type=Commits) は、作成者名に「wanstrath」を含むコミットとマッチします。 | |
committer-name:NAME | |
| [ | |
| committer-name:wanstrath](https://github.com/search?q=committer-name%3Awanstrath&type=Commits) は、コミッター名に「wanstrath」を含むコミットとマッチします。 |
author-email と committer-email の修飾子は、作成者またはコミッターの完全なメール アドレスによるコミットとマッチします。
| 修飾子 | 例 |
|---|---|
author-email:EMAIL | |
| [ | |
| ** | |
| author-email:chris@github.com | |
| ** | |
| ](https://github.com/search?q=author-email%3Achris%40github.com&type=Commits) は chris@github.com が作成したコミットとマッチします。 | |
committer-email:EMAIL | |
| [ | |
| ** | |
| committer-email:chris@github.com | |
| ** | |
| ](https://github.com/search?q=committer-email%3Achris%40github.com&type=Commits) は chris@github.com がコミットしたコミットとマッチします。 |
作成日またはコミット日で検索
author-date と committer-date の修飾子を使用すると、指定した日付範囲内で作成またはコミットされたコミットとマッチできます。
日付に対して検索を行う場合、結果をさらにフィルタリングするためにより大きい、より小さい、範囲の修飾子を利用できます。 詳しくは、「検索構文を理解する」をご覧ください。
| 修飾子 | 例 |
|---|---|
author-date:YYYY-MM-DD | |
| [ | |
| author-date:<2016-01-01](https://github.com/search?q=author-date%3A<2016-01-01&type=Commits) は、2016-01-01 より前に作成されたコミットとマッチします。 | |
committer-date:YYYY-MM-DD | |
| [ | |
| committer-date:>2016-01-01](https://github.com/search?q=committer-date%3A>2016-01-01&type=Commits) は、2016-01-01 より後にコミットされたコミットとマッチします。 |
マージコミットをフィルタリングする
merge 修飾子はマージ コミットをフィルタリングします。
| 修飾子 | 例 |
|---|---|
merge:true | |
| [ | |
| merge:true](https://github.com/search?q=merge%3Atrue&type=Commits) はマージ コミットとマッチします。 | |
merge:false | |
| [ | |
| merge:false](https://github.com/search?q=merge%3Afalse&type=Commits) はマージ以外のコミットとマッチします。 |
ハッシュで検索
hash 修飾子は、指定された SHA-1 ハッシュを含むコミットとマッチします。
| 修飾子 | 例 |
|---|---|
hash:HASH | |
| [ | |
hash:124a9a0ee1d8f1e15e833aff432fbb3b02632105](https://github.com/github/gitignore/search?q=hash%3A124a9a0ee1d8f1e15e833aff432fbb3b02632105&type=Commits) は、ハッシュ 124a9a0ee1d8f1e15e833aff432fbb3b02632105 を含むコミットとマッチします。 |
親で検索
parent 修飾子は、親が指定された SHA-1 ハッシュを持つコミットとマッチします。
| 修飾子 | 例 |
|---|---|
parent:HASH | |
| [ | |
parent:124a9a0ee1d8f1e15e833aff432fbb3b02632105](https://github.com/github/gitignore/search?q=parent%3A124a9a0ee1d8f1e15e833aff432fbb3b02632105&type=Commits&utf8=%E2%9C%93) は、ハッシュ 124a9a0ee1d8f1e15e833aff432fbb3b02632105 を持つコミットの子孫と一致します。 |
ツリーで検索
tree 修飾子は、指定された SHA-1 Git ツリー ハッシュを含むコミットとマッチします。
| 修飾子 | 例 |
|---|---|
tree:HASH | |
| [ | |
tree:99ca967](https://github.com/github/gitignore/search?q=tree%3A99ca967&type=Commits) は、ツリー ハッシュ 99ca967 を参照するコミットとマッチします。 |
ユーザまたは Organization のリポジトリ内の検索
特定のユーザーまたは組織が所有するすべてのリポジトリでコミットを検索するには、user または org 修飾子を使用します。 特定のリポジトリ内のコミットを検索するには、repo 修飾子を使用します。
| 修飾子 | 例 |
|---|---|
user:USERNAME | |
| [ | |
| gibberish user:defunkt](https://github.com/search?q=gibberish+user%3Adefunkt&type=Commits&utf8=%E2%9C%93) は、@defunkt が所有するリポジトリ内で「gibberish」という単語を含むコミット メッセージとマッチします。 | |
org:ORGNAME | |
| [ | |
| test org:github](https://github.com/search?utf8=%E2%9C%93&q=test+org%3Agithub&type=Commits) は、@github が所有するリポジトリ内で「test」という単語を含むコミット メッセージとマッチします。 | |
repo:USERNAME/REPO | |
| [ | |
| language repo:defunkt/gibberish](https://github.com/search?utf8=%E2%9C%93&q=language+repo%3Adefunkt%2Fgibberish&type=Commits) は、@defunkt の「gibberish」リポジトリ内で「language」という単語を含むコミット メッセージとマッチします。 |
リポジトリの可視性によるフィルタ
is 修飾子は、指定した可視性を持つリポジトリからのコミットとマッチします。 詳しくは、「リポジトリについて」をご覧ください。
| 修飾子 | 例 |
|---|---|
is:public | |
| [ | |
| is:public](https://github.com/search?q=is%3Apublic&type=Commits) はパブリック リポジトリへのコミットと一致します。 | |
is:internal | |
| [ | |
| is:internal](https://github.com/search?q=is%3Ainternal&type=Commits) は内部リポジトリへのコミットと一致します。 | |
is:private | |
| [ | |
| is:private](https://github.com/search?q=is%3Aprivate&type=Commits) はプライベート リポジトリへのコミットと一致します。 |