---
title: "List all commits"
method: GET
path: "/repos/{owner}/{repo}/commits"
tags: ["Repositories"]
---

# List all commits

`GET /repos/{owner}/{repo}/commits`

Returns commits from the HEAD of the default branch.

## Path parameters

- `owner` string, required
- `repo` string, required

## Query parameters

- `pageSize` integer

## Response `200`

Success

- Commit[]
  - `url` string
  - `sha` string
  - `html_url` string
  - `commit` object
    - `url` string
    - `message` string
    - `author` object
      - `name` string
      - `email` string
      - `date` string
    - `committer` object
      - `name` string
      - `email` string
      - `date` string
    - `tree` object
      - `url` string
      - `sha` string
  - `author` User
    - `id` integer
    - `username` string
    - `login` string — Alias of username for GitHub API compatibility
    - `full_name` string
    - `email` string, email
    - `avatar_url` string
  - `committer` User
    - `id` integer
    - `username` string
    - `login` string — Alias of username for GitHub API compatibility
    - `full_name` string
    - `email` string, email
    - `avatar_url` string
  - `parents` object[]
    - `url` string
    - `sha` string

## Other responses

- `404` — Repository not found.

---

[API](https://skmtc.net/gogs/apis/gogs-api.md) · [All operations](https://skmtc.net/gogs/apis/gogs-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gogs/gogs-api/revisions/87e2da32266c/schema)
