Skip to main content
GET
One commit and what it changes

Path Parameters

owner
string
required
Example:

"patch"

slug
string
required
Example:

"demo-mod"

Query Parameters

ref
string

A branch, a tag or a full commit hash: the default branch unless you say. A branch comes before a tag of the same name, and refs/tags/v1 says which.

Pattern: ^\S{1,255}$
Example:

"main"

Response

The commit

hash
string
required
message
string
required

Its message, its first 64 KiB at most.

parents
string[]
required

Empty for a repo's first commit.

author
object
required
committer
object
required
authored_at
string<date-time>
required
committed_at
string<date-time>
required
ref
string
required

The branch, tag or full commit hash it was asked for: the default branch unless given.

base
string | null
required

The commit files compares it to: its first parent. Null for a first commit.

files
object[]
required

What it changes. For a first commit, every file is added.

truncated
boolean
required

Whether anything was left out: patches stop at 300 files or 2 MiB, and the list at 3,000 files.