Dolt and DoltHub now initialize branch `main`

2 min read

Today we are announcing that with the release of Dolt v0.30.0, both the Dolt CLI and DoltHub will initialize branch main instead of branch master. This change is backwards compatible, so using this Dolt version with older databases will work normally. However, we did change which branch is checked out by default when a database is cloned.

If the database being cloned contains a main branch, that branch will be prioritized over master. If main isn't found, master will be checked out. And if neither branch is found, the first lexicographical branch will be checked out instead.

In addition, we've added two new ways to set the initialized branch name. Just as you would in Git, you can now specify the default initialized branch name using your dolt config by setting the init.defaultBranch property.

$ dolt config --global --add init.defaultBranch trunk
Config successfully updated.
$ dolt init
Successfully initialized dolt data repository.
$ dolt status
On branch trunk
nothing to commit, working tree clean

Or, you can use the dolt init command with the new --initial-branch flag to set the initial branch of the new database.

$ dolt init --initial-branch=production
Successfully initialized dolt data repository.
$ dolt status
On branch production
nothing to commit, working tree clean

Lastly, DoltHub is hiring! We want the builders of the future who are ready to disrupt the database industry and version the world's open data. We have a range of positions available, so if you're interested in working with us, let us know!

Curious about Dolt, DoltHub and versioned databases? There's no better place to get started than DoltHub.com where you can download Dolt, host your own public and private Dolt databases, or janky deploy any public database!

Questions, comments, or looking to start backing your application with a Dolt database? Get in touch with our team here or join us on Discord!

SHARE

JOIN THE DATA EVOLUTION

Get started with Dolt