Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

Neon · Const

Primary branch

In current Neon terminology, “primary branch” is called the project’s default branch. It is the root branch created with each project and serves as the normal origin for new branches.

Since
2024-06-21

How it works

Neon’s current documentation uses “default branch” for the branch historically called the primary branch. Each project has one root branch that is also its default branch; it is the starting point for child branches and cannot be deleted.

Key points

  • Every Neon project begins with a root branch.
  • The root branch is the project’s default branch—the current name for the primary branch concept.
  • A root branch has no parent branch.
  • When creating a branch, you may select any existing branch as its parent.
  • The selected parent determines the new branch’s initial schema and data.

Common mistakes

  • The branch name depends on how the project was created: Console projects use production, whereas API and CLI projects use main.
  • The root/default branch is protected from deletion.

Example: List project branches

neon branches list --project-id "$NEON_PROJECT_ID"

Lists the project's branches; use the branch designated as the default branch for the project's main database workflow.

When to use it

Keep the project’s main data branch as the default branch

Production baseline

Create child branches from the default branch for development and testing

Development isolation

Use an existing branch as the parent for additional isolated environments

Feature or preview environments

Interview questions

QWhat is the primary branch in current Neon terminology?

Neon’s current term is default branch rather than primary branch. It is the project’s root branch, and every project starts with one.

Follow-up: How do you identify it in different creation paths? Console-created projects use production; API- or CLI-created projects use main.

QWhat is the default parent when creating a branch?

A child branch is created from a selected existing branch. If no parent is specified, Neon uses the project’s default branch, so it supplies the normal starting point for new branches.

Follow-up: Can a child branch be based on another child? Yes; Neon allows branching from the default branch or any existing branch.

QWhat distinguishes the root/default branch from child branches?

The root branch is also the project’s default branch and cannot be deleted. Its schema and data provide the baseline from which other branches can be created.

Follow-up: What changes if you select another parent? The new branch derives its schema and data from that selected existing branch instead of directly from the default branch.

  • default branch
  • root branch
  • child branch
  • parent branch
  • branching

Source: Manage branches - Neon Docs. Checked 2026-10-16.