Get a repository commit
Returns a commit with file changes and statistics. Pagination applies to the changed files.
GET
/github/repos/{owner}/{repo}/commits/{ref}No authentication requiredPath parameters3
| Name | Type | Description |
|---|---|---|
owner* | string | The repository owner login. The value is case-insensitive. |
repo* | string | The repository name without the .git suffix. The value is case-insensitive. |
ref* | string | A commit hash, branch, or tag. Encode slashes when using a single path segment. |
Query parameters2
| Name | Type | Description |
|---|---|---|
per_page | integer | The number of results to return per page. Default: Minimum: 1Maximum: 100 |
page | integer | The page number to fetch. Default: Minimum: 1 |
Headers2
| Name | Type | Description |
|---|---|---|
If-None-Match | string | An ETag for conditional requests. |
If-Modified-Since | string | An HTTP date for conditional requests. |
Responses
application/jsonSchemaobject
Additional properties are allowed
shastringRequired
node_idstring
html_urlstring
Format: uri
commitobjectRequired
Additional properties are allowed
authorGithubUserSummary | null
committerGithubUserSummary | null
parentsobject[]
statsobject
Additional properties are allowed
filesGithubDiffFile[]
The original GitHub response.