stackyyflow stackyyflow - 1 year ago 69
Git Question

Retrieve all commits from Git statistics API

I want to retrieve ALL commits from Github using Git Statistics API:

GET /repos/:owner/:repo/commits

I tried to use
but it does not show me ALL commits, but a few latest. Is there a way to just retrieve the entire list of commits?

Answer Source

You need to follow "Traversing with Pagination" in order to retrieve all commits, because the result of such a commit query will be most likely paginated.
That is detailed in "Improved pagination for the Repository Commits API" (May 2014)

That would avoid sending back a result too big in one answer over http.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download