Skip to content

[Question] Setting branch as default #4716

@pmatos

Description

@pmatos

I'm using Supabase branching with two branches:

  • main → staging database
  • production → production database

I'd like to set main (staging) as the default branch so that CLI commands without --branch operate on staging rather than production. This reduces the risk of accidentally modifying the production database.

I've checked:

  • supabase branches update --help - no --default flag available
  • The dashboard under Project Settings → Branching - couldn't find an option to change the default branch

Questions:

  1. Is there a way to set the default branch via CLI or dashboard that I'm missing?
  2. If not, would you consider this as a feature request?

Use case:
When the default branch is staging, developers are protected from accidental production changes. Any production operations would require explicit --branch production, making destructive mistakes less likely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions