You can toggle the branch protection status for your projects in CodeSandbox. This works for both cloud sandboxes and repositories.
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
Project Settingsand click on
- 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.