Branch Protection
You can toggle the branch protection status for your projects in CodeSandbox. This works for both Devboxes and repositories.
The main
branch of a project is protected by default to prevent unauthorized or accidental changes. However, you might want to change this setting if you want to commit directly to main
, namely if you're working as a solo developer or on a smaller project.
To change this setting for your project, take the following steps:
- Open your project in the web editor
- Select the menu on the top left
- Select
Project Settings
and click onRepository
- Toggle on or off
💡
If you unprotect your main branch, you would need to commit any changes to be able to toggle the protection on again.