LogoFreestyle
API Reference/Git

List commits for a repository

List commits from the Git database for a specific repository and branch.

GET/git/v1/repo/{repo}/git/commits

Path Parameters

repoRequiredstring

The repository id

Format: "uuid"

Query Parameters

branchstring | null

Branch name (defaults to HEAD)

limitinteger | null

Maximum number of commits to return (default: 50, max: 500)

Minimum: 0
offsetinteger | null

Number of commits to skip (default: 0)

Minimum: 0

Response Body

200

Commits retrieved successfully

commitsRequiredarray<object>

List of commits

countRequiredinteger

Number of commits returned in this page

Minimum: 0
offsetRequiredinteger

Number of commits skipped (offset)

Minimum: 0
limitRequiredinteger

Maximum number of commits requested (limit)

Minimum: 0
totalRequiredinteger

Total number of commits available in the branch

Minimum: 0

400

Invalid request

messageRequiredstring

403

Forbidden

messageRequiredstring

404

Repository or branch not found

messageRequiredstring

500

Internal server error

messageRequiredstring
curl -X GET "https://api.freestyle.sh/git/v1/repo/497f6eca-6276-4993-bfeb-53cbbbba6f08/git/commits?branch=main&limit=50&offset=0"

Commits retrieved successfully

{
  "commits": [
    {
      "author": {
        "date": "2019-08-24T14:15:22Z",
        "name": "string",
        "email": "string"
      },
      "committer": {
        "date": "2019-08-24T14:15:22Z",
        "name": "string",
        "email": "string"
      },
      "message": "string",
      "tree": {
        "sha": "string"
      },
      "parents": [
        {
          "sha": "string"
        }
      ],
      "sha": "string"
    }
  ],
  "count": 0,
  "offset": 0,
  "limit": 0,
  "total": 0
}

Freestyle AI

Documentation assistant

Experimental: AI responses may not always be accurate—please verify important details with the official documentation.

How can I help?

Ask me about Freestyle while you browse the docs.