# org.tangled.git.setDefaultBranch

> Published by [tangled.org](https://lexicon.garden/identity/did:plc:wshs7t2adsemcrrd4snkeqli)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.git.setDefaultBranch)
- [Documentation](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.git.setDefaultBranch/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.git.setDefaultBranch/examples)

## Definitions

### `org.tangled.git.setDefaultBranch`

**Type**: `procedure`

Set the default branch of this repository

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `branch` | `string` | Yes | Branch name without the refs/heads/ prefix |
| `repo` | `string` (did) | Yes | DID of the repository |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | Yes | Version of the refs record after the move |
| `uri` | `string` (at-uri) | Yes | The repository's org.tangled.git.refs record |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Set the default branch of this repository",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "branch": {
              "description": "Branch name without the refs/heads/ prefix",
              "maxLength": 244,
              "type": "string"
            },
            "repo": {
              "description": "DID of the repository",
              "format": "did",
              "type": "string"
            }
          },
          "required": [
            "repo",
            "branch"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cid": {
              "description": "Version of the refs record after the move",
              "format": "cid",
              "type": "string"
            },
            "uri": {
              "description": "The repository's org.tangled.git.refs record",
              "format": "at-uri",
              "type": "string"
            }
          },
          "required": [
            "uri",
            "cid"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "org.tangled.git.setDefaultBranch",
  "lexicon": 1
}
```
