GET/gists/{gist_id}/commits

List commits for a gist

Lists commits in a gist, including each commit's version, author, timestamp, and change counts. Use page and per_page to paginate the results.

3 parameters
gist_idstringrequired
The unique identifier of the gist whose commits to list.
per_pageintegeroptional
Number of results per page, up to 100. Defaults to 30 when omitted.
Default:30
pageintegeroptional
Page number of the results to retrieve. Defaults to 1 when omitted.
Default:1

4 status codes
200Returns an array of gist commit objects, each containing the commit version, author, timestamp, URL, and change status.
urlstringrequired
versionstringrequired
userobjectrequired
A GitHub user.
change_statusobjectrequired
committed_atstringrequired
304Returned when the gist commits have not changed since the last request.
403Returned when the authenticated user is not permitted to access the gist commits.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Returned when no gist exists with the given `gist_id`.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 403 is returned when the authenticated user cannot access the gist. A 404 is returned when the gist_id path parameter does not identify an existing gist.