Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
GitHub Docs

Searching commits

You can search for commits on GitHub and narrow the results using these commit search qualifiers in any combination.

You can search for commits globally across all of GitHub, or search for commits within a particular repository or organization. For more information, seeAbout searching on GitHub.

When you search for commits, only thedefault branch of a repository is searched.

Tip

  • This article contains links to example searches on the GitHub.com website, but you can use the same search filters in any GitHub platform. In the linked example searches, replacegithub.com with the hostname for your GitHub platform.
  • For a list of search syntaxes that you can add to any search qualifier to further improve your results, seeUnderstanding the search syntax.
  • Use quotations around multi-word search terms. For example, if you want to search for issues with the label "In progress," you'd search forlabel:"in progress". Search is not case sensitive.

Search within commit messages

You can find commits that contain particular words in the message. For example,fix typo matches commits containing the words "fix" and "typo."

Search by author or committer

You can find commits by a particular user with theauthor orcommitter qualifiers.

QualifierExample
author:USERNAMEauthor:defunkt matches commits authored by @defunkt.
committer:USERNAMEcommitter:defunkt matches commits committed by @defunkt.

Theauthor-name andcommitter-name qualifiers match commits by the name of the author or committer.

QualifierExample
author-name:NAMEauthor-name:wanstrath matches commits with "wanstrath" in the author name.
committer-name:NAMEcommitter-name:wanstrath matches commits with "wanstrath" in the committer name.

Theauthor-email andcommitter-email qualifiers match commits by the author's or committer's full email address.

QualifierExample
author-email:EMAILauthor-email:chris@github.com matches commits authored bychris@github.com.
committer-email:EMAILcommitter-email:chris@github.com matches commits committed bychris@github.com.

Search by authored or committed date

Use theauthor-date andcommitter-date qualifiers to match commits authored or committed within the specified date range.

When you search for a date, you can use greater than, less than, and range qualifiers to further filter results. For more information, seeUnderstanding the search syntax.

QualifierExample
author-date:YYYY-MM-DDauthor-date:<2016-01-01 matches commits authored before 2016-01-01.
committer-date:YYYY-MM-DDcommitter-date:>2016-01-01 matches commits committed after 2016-01-01.

Filter merge commits

Themerge qualifier filters merge commits.

QualifierExample
merge:truemerge:true matches merge commits.
merge:falsemerge:false matches non-merge commits.

Search by hash

Thehash qualifier matches commits with the specified SHA-1 hash.

QualifierExample
hash:HASHhash:124a9a0ee1d8f1e15e833aff432fbb3b02632105 matches commits with the hash124a9a0ee1d8f1e15e833aff432fbb3b02632105.

Search by parent

Theparent qualifier matches commits whose parent has the specified SHA-1 hash.

QualifierExample
parent:HASHparent:124a9a0ee1d8f1e15e833aff432fbb3b02632105 matches children of commits with the hash124a9a0ee1d8f1e15e833aff432fbb3b02632105.

Search by tree

Thetree qualifier matches commits with the specified SHA-1 git tree hash.

QualifierExample
tree:HASHtree:99ca967 matches commits that refer to the tree hash99ca967.

Search within a user's or organization's repositories

To search commits in all repositories owned by a certain user or organization, use theuser ororg qualifier. To search commits in a specific repository, use therepo qualifier.

QualifierExample
user:USERNAMEgibberish user:defunkt matches commit messages with the word "gibberish" in repositories owned by @defunkt.
org:ORGNAMEtest org:github matches commit messages with the word "test" in repositories owned by @github.
repo:USERNAME/REPOlanguage repo:defunkt/gibberish matches commit messages with the word "language" in @defunkt's "gibberish" repository.

Filter by repository visibility

Theis qualifier matches commits from repositories with the specified visibility. For more information, seeAbout repositories.

QualifierExample
is:publicis:public matches commits to public repositories.
is:privateis:private matches commits to private repositories.

Further reading


[8]ページ先頭

©2009-2025 Movatter.jp