Change the project default
Make a staging or release branch the project’s default for subsequent workflows.
Neon · Const
Neon’s default branch is the project’s designated branch for default workflows and implicit branch creation. It starts as the root branch, but you can move the designation to another existing branch.
A Neon project always has one branch marked as its default. You can assign that role to another existing branch; Neon removes the designation from the former default. The default branch is also the source used when creating a branch without explicitly choosing a parent.
neon branches set-default <id|name>| Name | Type | Description |
|---|---|---|
id|name | string | Branch ID or name to designate as the project default. |
The selected branch becomes the project's default branch, and the prior default designation is removed.
DEFAULT label.neon branches set-default stagingSets the existing staging branch as the project's default branch.
Make a staging or release branch the project’s default for subsequent workflows.
Create a branch without specifying a parent and have it derive from the project default.
Identify the branch selected by default in the Neon Console.
A default branch is the project branch carrying Neon’s default designation. It is selected automatically in relevant Console workflows, and a branch created without an explicit parent is based on it.
Follow-up: How do you change it? Use the CLI neon branches set-default <id|name> or the API endpoint that sets a specified branch as default; the previous designation is removed.
The initial branch is the project’s root branch, which is also designated as the default. Console-created projects name it production, while API- or CLI-created projects name it main.
Follow-up: Can the root branch be removed? No. The root branch cannot be deleted, regardless of whether its name is production or main.
Any existing branch can become the project’s default branch. In the Console it is identified with a DEFAULT tag, and changing the designation automatically removes it from the former default.
Follow-up: What operational behavior follows the designation? New branches with no specified parent derive from whichever branch currently has the designation.
root branchbranchneon branches set-defaultsetDefaultProjectBranch