---
title: "overlane repo branches"
description: "List a repository's branches and which are protected"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.overlane.app/llms.txt
> Use this file to discover all available pages before exploring further.

# overlane repo branches

{/* Generated by apps/docs/scripts/generate.mjs (CLI pages from the command registry in packages/cli). Do not edit; run `pnpm --filter @overlane/docs gen`. */}

Lists branches with their tip commits and whether branch protection applies.

## Usage

```sh
overlane repo branches repo
```

## Arguments

| Argument | Required | Description |
| --- | --- | --- |
| `repo` | yes | The repository name or ID |

## Examples

```sh
overlane repo branches app
```

## Behavior

- Effect: `read` (changes nothing).
- Needs credentials: yes. Uses the network: yes.
- Supports `--dry-run`: no. Accepts `--force`: no.
- Machine-readable description: `overlane schema repo branches`.

## Result

With `--json` (the default when stdout is not a terminal) the command prints this JSON Schema's shape on stdout.

```json
{
  "type": "object",
  "properties": {
    "tenantId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
      "description": "tenant identifier"
    },
    "repoId": {
      "type": "string",
      "pattern": "^repo_[A-Za-z0-9]{6,40}$"
    },
    "branches": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
            "description": "tenant identifier"
          },
          "repoId": {
            "type": "string",
            "pattern": "^repo_[A-Za-z0-9]{6,40}$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "^[A-Za-z0-9._/-]+$"
          },
          "sha": {
            "type": "string",
            "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
          },
          "protected": {
            "type": "boolean"
          }
        },
        "required": [
          "tenantId",
          "repoId",
          "name",
          "sha",
          "protected"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "tenantId",
    "repoId",
    "branches"
  ],
  "additionalProperties": false
}
```

See [exit codes](/cli/#exit-codes) for the status the process returns.

Source: https://docs.overlane.app/cli/repo-branches/index.mdx
