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.

  1. Open the repository on Bitbucket Cloud's website.

  2. Select Repository settings from the left sidebar. The page Repository details will open.

  3. Select advanced on this page.

  4. Scroll down to see the advanced options, and you will see a drop-down with the title Main branch.

  5. Select the Main branch drop-down and choose the new branch you want to set as the repo's main branch.

  6. Select Save changes at the bottom of the page.

Updated on June 13, 2025

Still need help?

The Atlassian Community is here for you.