tb branch

Manages branches in your Tinybird project. Branches allow you to develop and test your project in ephemeral environments using production data. Global options apply to this command. See Global options.

The following subcommands are available:

SubcommandDescription
create BRANCH_NAME [OPTIONS]Creates a new branch from your production workspace.
rm BRANCH_NAME [OPTIONS]Removes an existing branch.
ls [OPTIONS]Lists all available branches.

tb branch create

Creates a new branch from your production workspace. You can optionally include the last partition of production data.

tb branch create my_feature_branch

To create a branch with production data:

tb branch create my_feature_branch --last-partition
OptionDescription
--last-partitionBrings the last partition of production data into the branch
--wait / --no-waitWaits until the branch is ready before exiting, including the --last-partition copy. Default: --wait
--ignore-datasourceDeprecated. Ignored with a warning. Use tb branch create without this flag.

Use the --last-partition flag when you want to test your changes with real production data.

--with-connections isn't an option on tb branch create. To bring connector Data Sources into a branch, create the branch first, then build it with the flag:

tb branch create my_feature_branch --last-partition
tb --branch=my_feature_branch build --with-connections

tb branch create doesn't exit until the --last-partition copy has finished, so the build runs with production data already in place. See Test with connector data.

tb branch rm

Removes an existing branch from your workspace.

tb branch rm my_feature_branch

To skip the confirmation prompt:

tb branch rm my_feature_branch --yes
OptionDescription
--yesSkips confirmation prompt and removes the branch immediately

Removing a branch is irreversible and deletes all data and changes in the branch.

tb branch ls

Lists all available branches in your workspace.

tb branch ls

This command shows all branches you have created, along with their status and creation information.

Working with branches

Once you create a branch, you can start working with it using the --branch flag with other commands:

# Start development in a branch
tb --branch=my_feature_branch dev

# Open Tinybird UI for the branch
tb --branch=my_feature_branch open

For more information about working with branches, see Branches.

Environment support

EnvironmentSupportedDescription
--local✗ NoBranches are not available locally.
--cloud✗ NoBranches are always created associated with a workspace in Tinybird Cloud.
--branch=BRANCH_NAME✗ NoUse --branch with other commands to work in a branch, not for managing branches.
Updated