Skip to main content
Manage Tinybird branches directly from the CLI. View, inspect, and delete branches created during development.

Syntax

tinybird branch <command> [options]

Commands

tinybird branch list

List Branches

View all branches in your workspace:
tinybird branch list
Output
Branches in workspace: my-workspace

  Name                     Created              Status
  ─────────────────────────────────────────────────────
  feature-analytics        2024-01-15 10:23     active
  feature-user-events      2024-01-14 15:42     active  
  fix-schema-bug           2024-01-13 09:15     active

✓ Found 3 branches

List Output

Each branch shows:
  • Name: Sanitized branch name for Tinybird
  • Created: When branch was created
  • Status: Branch state (active, merged, etc.)

Branch Status

Show status of current git branch:
tinybird branch status
Output
Current branch status:

  Git branch:       feature/analytics
  Tinybird branch:  feature-analytics
  Status:           active
  Created:          2024-01-15 10:23
  Cached token:     yes
  
  Dashboard: https://ui.tinybird.co/my-workspace/branch/feature-analytics

On Main Branch

# Switch to main
git checkout main
tinybird branch status
Output
Current branch status:

  Git branch:       main
  Tinybird branch:  (none - main workspace)
  Status:           main branch
  
  Dashboard: https://ui.tinybird.co/my-workspace

Branch Not Created Yet

# New feature branch
git checkout -b feature/new-feature
tinybird branch status
Output
Current branch status:

  Git branch:       feature/new-feature
  Tinybird branch:  feature-new-feature
  Status:           not created
  Cached token:     no
  
Tip: Run 'tinybird dev' or 'tinybird build' to create this branch

Delete Branch

Delete a Tinybird branch:
tinybird branch delete feature-analytics
Output
⚠ This will permanently delete branch: feature-analytics
  All resources in this branch will be removed.

Continue? (y/N) y

✓ Branch deleted: feature-analytics
✓ Cached token removed
Deleting a branch removes all resources in that branch. This cannot be undone.

Delete Without Confirmation (CI)

yes | tinybird branch delete old-feature
Or set CI=true:
CI=true tinybird branch delete old-feature

Branch Naming

Git branch names are sanitized for Tinybird:
Git Branch              → Tinybird Branch
─────────────────────────────────────────
feature/analytics       → feature-analytics
fix/bug-123             → fix-bug-123
user/john/experiment    → user-john-experiment
123-numeric-start       → b-123-numeric-start
Rules:
  • Slashes (/) → hyphens (-)
  • Must start with letter → prefix b- if numeric
  • Special characters removed
  • Lowercase only

Branch Lifecycle

1. Creation

Branches created automatically on first build/dev:
git checkout -b feature/new-endpoint
tinybird dev
✓ Branch created: feature-new-endpoint

2. Development

Work in isolated branch:
tinybird dev
# Make changes, auto-sync to branch

3. Review

Check branch status:
tinybird branch status

4. Merge

Merge to main, deploy to production:
git checkout main
git merge feature/new-endpoint
tinybird deploy

5. Cleanup

Delete branch after merge:
tinybird branch delete feature-new-endpoint

Dashboard URLs

Each branch has its own dashboard:
tinybird branch status
Dashboard: https://ui.tinybird.co/workspace/branch/feature-analytics
Click to view:
  • Datasources in branch
  • Pipes and endpoints
  • Run queries
  • View data

Cached Tokens

Branch tokens are cached locally for performance:
~/.tinybird/branches.json
{
  "workspace-id-123": {
    "feature-analytics": {
      "id": "branch-id-456",
      "token": "p.branch_token...",
      "createdAt": "2024-01-15T10:23:00Z"
    }
  }
}
Cache is automatically updated:
  • On branch creation
  • On branch deletion
  • When token refreshed

Examples

List All Branches

tinybird branch list

Check Current Branch

tinybird branch status

Delete Old Branches

tinybird branch delete old-feature-1
tinybird branch delete old-feature-2
tinybird branch delete experimental

Clean Up After PR Merge

# After PR merged to main
git checkout main
git pull

# Delete remote git branch
git push origin --delete feature/analytics

# Delete local git branch  
git branch -d feature/analytics

# Delete Tinybird branch
tinybird branch delete feature-analytics

Automation: Delete Merged Branches

#!/bin/bash
# delete-merged-branches.sh

# Get merged git branches
MERGED=$(git branch --merged main | grep -v "^\*" | grep -v "main")

# Delete corresponding Tinybird branches
for BRANCH in $MERGED; do
  # Sanitize branch name (basic)
  TB_BRANCH=$(echo $BRANCH | tr '/' '-')
  echo "Deleting: $TB_BRANCH"
  tinybird branch delete "$TB_BRANCH" 2>/dev/null || true
done

Branch Limits

Workspace branch limits:
  • Free tier: 3 branches
  • Starter: 10 branches
  • Build: 25 branches
  • Scale: Unlimited
Delete unused branches to stay within limits.

Multiple Team Members

Each team member can have their own branch:
# Alice
git checkout -b alice/feature
tinybird dev
# Branch: alice-feature

# Bob  
git checkout -b bob/feature
tinybird dev
# Branch: bob-feature
Branches are isolated - no conflicts.

Troubleshooting

Branch Not Found

Error: Branch not found: feature-analytics
Branch doesn’t exist or was already deleted:
tinybird branch list

Cannot Delete Active Branch

Error: Cannot delete branch you're currently on
Switch to different branch first:
git checkout main
tinybird branch delete feature-analytics

Branch Limit Reached

Error: Workspace branch limit reached (3/3)
Delete unused branches:
tinybird branch list
tinybird branch delete old-branch-1

Token Cache Stale

If branch commands fail with auth errors:
# Clear cache
rm ~/.tinybird/branches.json

# Rebuild will refresh
tinybird build
  • dev: Create/use branches automatically
  • build: Deploy to branches
  • deploy: Deploy to main (not branch)
  • info: View workspace and branch info
Branches are workspace-specific. Each workspace has its own set of branches.
Deleting a branch deletes all resources in that branch. Export important resources before deletion.

Build docs developers (and LLMs) love