How to set up branch protection rules on DoltHub

FEATURE RELEASE
2 min read

Branch Protection

For those of you that are new, Dolt is a database that supports Git-style versioning. DoltHub is a place on the internet to share and collaborate on Dolt databases. Dolt has Git-like functionality, including branch, merge, clone, push and pull. Today we are excited to announce that we just launched the ability to set up branch protection rules!

What is branch protection?

Branches are an important part of collaborative work using Dolt. Collaborators with write permission might delete important branches or delete the commit history by force pushing. Branch protection is a powerful configuration option that enables administrators to enforce security policies. It can help protect branches from unexpected commits or deletion by any unauthorized user/group.

How to set up branch protection rules on DoltHub

Dolt branches can be protected by setting up branch protection rules in DoltHub. The feature is available to database administrators.

Step 1: Navigate to database settings page

On database settings page, click the Branch Protection tab to manage branch protection rules.

Database Settings

Step 2: Select the branch and protection rules

Select the branch and check the rules you want to apply. For now, the only option is protecting a branch from getting deleted. We will have options like preventing force pushes, preventing direct commits and requiring pull request reviews before merging available in the future.

Branch Protection Settings

Step 3: Click Add protection

Congrats! You have just defined main as a protected branch. And it is added to the protected branch section as shown below, where you can delete and eventually update branch protections.

Protected Branch

Need more protection options?

As mentioned above, we have more protection rules coming soon (follow the issue here). If you want us to prioritize a specific branch protection or want a branch protection option that isn't listed above, just reach out to us on Discord, or file a feature request on GitHub.

Protect your branches today!

SHARE

JOIN THE DATA EVOLUTION

Get started with Dolt

Or join our mailing list to get product updates.