Change the main branch of a Bitbucket Cloud repository
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
This article covers how to change the main branch used by your repository in Bitbucket Cloud.
Solution
To change the current main branch to a different branch, you will need to follow the steps below:
The following steps must be performed by a repository administrator. If you don't have repository administrator permissions, you must contact a user who does and have them perform the steps outlined below.
Open the repository on Bitbucket Cloud's website.
Select Repository settings from the left sidebar. The page Repository details will open.
Select advanced on this page.
Scroll down to see the advanced options, and you will see a drop-down with the title Main branch.
Select the Main branch drop-down and choose the new branch you want to set as the repo's main branch.
Select Save changes at the bottom of the page.
Was this helpful?