GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
GH-SEARCH-COMMITS(1) GitHub CLI manual GH-SEARCH-COMMITS(1)

gh-search-commits - Search for commits

gh search commits [<query>] [flags]

Search for commits on GitHub.

The command supports constructing queries using the GitHub search syntax, using the parameter and qualifier flags, or a combination of the two.

GitHub search syntax is documented at:

⟨https://docs.github.com/search-github/searching-on-github/searching-commits⟩

Filter by author

Filter based on authored date

Filter on author email

Filter on author name

Filter by committer

Filter based on committed date

Filter on committer email

Filter on committer name

Filter by commit hash

Filter JSON output using a jq expression

Output JSON with the specified fields

Maximum number of commits to fetch

Filter on merge commits

Order of commits returned, ignored unless '--sort' flag is specified: {asc|desc}

Filter on repository owner

Filter by parent hash

Filter on repository

Sort fetched commits: {author-date|committer-date}

Format JSON output using a Go template; see "gh help formatting"

Filter by tree hash

Filter based on repository visibility: {public|private|internal}

Open the search query in the web browser

author, commit, committer, id, parents, repository, sha, url

0: Successful execution

1: Error

2: Command canceled

4: Authentication required

NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.

# Search commits matching set of keywords "readme" and "typo"
$ gh search commits readme typo
# Search commits matching phrase "bug fix"
$ gh search commits "bug fix"
# Search commits committed by user "monalisa"
$ gh search commits --committer=monalisa
# Search commits authored by users with name "Jane Doe"
$ gh search commits --author-name="Jane Doe"
# Search commits matching hash "8dd03144ffdc6c0d486d6b705f9c7fba871ee7c3"
$ gh search commits --hash=8dd03144ffdc6c0d486d6b705f9c7fba871ee7c3
# Search commits authored before February 1st, 2022
$ gh search commits --author-date="<2022-02-01"

gh-search(1)

Jul 2025

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.