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

# checkout

> Checkout a branch

The `checkout` command allows you to switch to a different branch.

## Usage

```bash theme={null}
xata checkout [branch name]
```

<ParamField path="branch name" type="string">
  The branch to switch to
</ParamField>

<ParamField path="--organization" type="string">
  Organization ID
</ParamField>

<ParamField path="--project" type="string">
  Project ID
</ParamField>

<ParamField path="--branch" type="string">
  Branch ID
</ParamField>

<ParamField path="--database" type="string">
  Database name
</ParamField>

<ParamField path="--json" type="boolean">
  Output in JSON format (default: false)
</ParamField>

<ParamField path="-h, --help" type="boolean">
  Print help information and exit
</ParamField>

## Examples

```bash theme={null}
# Checkout a specific branch
xata checkout main

# Checkout with specific organization and project
xata checkout feature-branch --organization org-123 --project proj-456
```
