{"meta":{"title":"Searching commits","intro":"You can search for commits on GitHub and narrow the results using these commit search qualifiers in any combination.","product":"Search on GitHub","breadcrumbs":[{"href":"/en/search-github","title":"Search on GitHub"},{"href":"/en/search-github/searching-on-github","title":"Searching on GitHub"},{"href":"/en/search-github/searching-on-github/searching-commits","title":"Searching commits"}],"documentType":"article"},"body":"# Searching commits\n\nYou can search for commits on GitHub and narrow the results using these commit search qualifiers in any combination.\n\nYou can search for commits globally across all of GitHub, or search for commits within a particular repository or organization. For more information, see [About searching on GitHub](/en/search-github/getting-started-with-searching-on-github/about-searching-on-github).\n\nWhen you search for commits, only the [default branch](/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches) of a repository is searched.\n\n> \\[!TIP]\n>\n> * 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, replace `github.com` with the hostname for your GitHub platform.\n> * For a list of search syntaxes that you can add to any search qualifier to further improve your results, see [Understanding the search syntax](/en/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax).\n> * Use quotations around multi-word search terms. For example, if you want to search for issues with the label \"In progress,\" you'd search for `label:\"in progress\"`. Search is not case sensitive.\n\n## Search within commit messages\n\nYou can find commits that contain particular words in the message. For example, [**fix typo**](https://github.com/search?q=fix+typo\\&type=Commits) matches commits containing the words \"fix\" and \"typo.\"\n\n## Search by author or committer\n\nYou can find commits by a particular user with the `author` or `committer` qualifiers.\n\n| Qualifier                                | Example                                                                                                                       |\n| ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |\n| <code>author:<em>USERNAME</em></code>    | [**author:defunkt**](https://github.com/search?q=author%3Adefunkt\\&type=Commits) matches commits authored by @defunkt.        |\n| <code>committer:<em>USERNAME</em></code> | [**committer:defunkt**](https://github.com/search?q=committer%3Adefunkt\\&type=Commits) matches commits committed by @defunkt. |\n\nThe `author-name` and `committer-name` qualifiers match commits by the name of the author or committer.\n\n| Qualifier                                 | Example                                                                                                                                                      |\n| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| <code>author-name:<em>NAME</em></code>    | [**author-name:wanstrath**](https://github.com/search?q=author-name%3Awanstrath\\&type=Commits) matches commits with \"wanstrath\" in the author name.          |\n| <code>committer-name:<em>NAME</em></code> | [**committer-name:wanstrath**](https://github.com/search?q=committer-name%3Awanstrath\\&type=Commits) matches commits with \"wanstrath\" in the committer name. |\n\nThe `author-email` and `committer-email` qualifiers match commits by the author's or committer's full email address.\n\n| Qualifier                                   | Example                                                                                                                                                                 |\n| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| <code>author-email:<em>EMAIL</em></code>    | [**author-email:chris@github.com**](https://github.com/search?q=author-email%3Achris%40github.com\\&type=Commits) matches commits authored by <chris@github.com>.        |\n| <code>committer-email:<em>EMAIL</em></code> | [**committer-email:chris@github.com**](https://github.com/search?q=committer-email%3Achris%40github.com\\&type=Commits) matches commits committed by <chris@github.com>. |\n\n## Search by authored or committed date\n\nUse the `author-date` and `committer-date` qualifiers to match commits authored or committed within the specified date range.\n\nWhen you search for a date, you can use greater than, less than, and range qualifiers to further filter results. For more information, see [Understanding the search syntax](/en/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax).\n\n| Qualifier                                       | Example                                                                                                                                              |\n| ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |\n| <code>author-date:<em>YYYY-MM-DD</em></code>    | [**author-date:<2016-01-01**](https://github.com/search?q=author-date%3A<2016-01-01\\&type=Commits) matches commits authored before 2016-01-01.       |\n| <code>committer-date:<em>YYYY-MM-DD</em></code> | [**committer-date:>2016-01-01**](https://github.com/search?q=committer-date%3A>2016-01-01\\&type=Commits) matches commits committed after 2016-01-01. |\n\n## Filter merge commits\n\nThe `merge` qualifier filters merge commits.\n\n| Qualifier     | Example                                                                                               |\n| ------------- | ----------------------------------------------------------------------------------------------------- |\n| `merge:true`  | [**merge:true**](https://github.com/search?q=merge%3Atrue\\&type=Commits) matches merge commits.       |\n| `merge:false` | [**merge:false**](https://github.com/search?q=merge%3Afalse\\&type=Commits) matches non-merge commits. |\n\n## Search by hash\n\nThe `hash` qualifier matches commits with the specified SHA-1 hash.\n\n| Qualifier                       | Example                                                                                                                                                                                                                                   |\n| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| <code>hash:<em>HASH</em></code> | [**hash:124a9a0ee1d8f1e15e833aff432fbb3b02632105**](https://github.com/github/gitignore/search?q=hash%3A124a9a0ee1d8f1e15e833aff432fbb3b02632105\\&type=Commits) matches commits with the hash `124a9a0ee1d8f1e15e833aff432fbb3b02632105`. |\n\n## Search by parent\n\nThe `parent` qualifier matches commits whose parent has the specified SHA-1 hash.\n\n| Qualifier                         | Example                                                                                                                                                                                                                                                                   |\n| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| <code>parent:<em>HASH</em></code> | [**parent:124a9a0ee1d8f1e15e833aff432fbb3b02632105**](https://github.com/github/gitignore/search?q=parent%3A124a9a0ee1d8f1e15e833aff432fbb3b02632105\\&type=Commits\\&utf8=%E2%9C%93) matches children of commits with the hash `124a9a0ee1d8f1e15e833aff432fbb3b02632105`. |\n\n## Search by tree\n\nThe `tree` qualifier matches commits with the specified SHA-1 git tree hash.\n\n| Qualifier                       | Example                                                                                                                                              |\n| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |\n| <code>tree:<em>HASH</em></code> | [**tree:99ca967**](https://github.com/github/gitignore/search?q=tree%3A99ca967\\&type=Commits) matches commits that refer to the tree hash `99ca967`. |\n\n## Search within a user's or organization's repositories\n\nTo search commits in all repositories owned by a certain user or organization, use the `user` or `org` qualifier. To search commits in a specific repository, use the `repo` qualifier.\n\n| Qualifier                                | Example                                                                                                                                                                                                                     |\n| ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| <code>user:<em>USERNAME</em></code>      | [**gibberish user:defunkt**](https://github.com/search?q=gibberish+user%3Adefunkt\\&type=Commits\\&utf8=%E2%9C%93) matches commit messages with the word \"gibberish\" in repositories owned by @defunkt.                       |\n| <code>org:<em>ORGNAME</em></code>        | [**test org:github**](https://github.com/search?utf8=%E2%9C%93\\&q=test+org%3Agithub\\&type=Commits) matches commit messages with the word \"test\" in repositories owned by @github.                                           |\n| <code>repo:<em>USERNAME/REPO</em></code> | [**language repo:defunkt/gibberish**](https://github.com/search?utf8=%E2%9C%93\\&q=language+repo%3Adefunkt%2Fgibberish\\&type=Commits) matches commit messages with the word \"language\" in @defunkt's \"gibberish\" repository. |\n\n## Filter by repository visibility\n\nThe `is` qualifier matches commits from repositories with the specified visibility. For more information, see [About repositories](/en/repositories/creating-and-managing-repositories/about-repositories#about-repository-visibility).\n\n| Qualifier    | Example                                                                                                           |\n| ------------ | ----------------------------------------------------------------------------------------------------------------- |\n| `is:public`  | [**is:public**](https://github.com/search?q=is%3Apublic\\&type=Commits) matches commits to public repositories.    |\n|              |                                                                                                                   |\n| `is:private` | [**is:private**](https://github.com/search?q=is%3Aprivate\\&type=Commits) matches commits to private repositories. |\n\n## Further reading\n\n* [Sorting search results](/en/search-github/getting-started-with-searching-on-github/sorting-search-results)"}