Skip to content

Get a commit's diff or patch

GET
/repos/{owner}/{repo}/git/commits/{sha}.{diffType}
owner
required
string

Owner of the repo

repo
required
string

Name of the repo

sha
required
string

SHA of the commit to get

diffType
required
string
Allowed values: diff patch

Whether the output is diff or patch

APIString is a string response

Media type text/plain
string

APINotFound is a not found error response

Media type text/plain
object
errors
Array<string>
message
string
url
string