---
title: "Get a tree"
method: GET
path: "/repos/{owner}/{repo}/git/trees/{sha}"
tags: ["Miscellaneous"]
---

# Get a tree

`GET /repos/{owner}/{repo}/git/trees/{sha}`

## Path parameters

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

## Response `200`

Success

- GitTree
  - `sha` string
  - `url` string
  - `tree` object[]
    - `path` string
    - `mode` string
    - `type` string
    - `size` integer
    - `sha` string
    - `url` string

## Other responses

- `404` — Resource 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)
