No default branch is generated when creating a repository in Bitbucket Cloud
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
When creating new repositories in Bitbucket Cloud, the default branch is not being created.
Cause
The problem arises when a branch restriction is set at the project level, prohibiting any user from having write access.
For instance, if there's a branch restriction for the develop branch and the default branch to be created is also develop, then the user attempting to create a repository must have write permission in the project's branch restrictions.
Solution
Navigate to Project Settings => Branch Restrictions.
Check for any branch restrictions on the default branch to be created.
If a branch restriction exists, ensure that the user attempting to create a repository has write access.
Was this helpful?