How to change the main branch

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

Learn how to change the main branch used by your repository in Bitbucket Cloud.

Environment

Bitbucket Cloud 

Solution

To change the current main branch to a different branch, you will need to follow the steps below:

The following steps will need to be performed by a repository administrator, if you do not have repository administrator permissions - you will need to reach out to a user who does and have them perform the steps outlined below.

  1. Create a new branch from the current main branch (if not already created)

  2. Access Repository Settings > Repository Detailsand expand the Advanced dropdown to reveal the branch options

  3. In the Main Branch dialogue select the new branch from the dropdown list that you want to set as the main branch

  4. Click Save Changes when complete

Updated on March 3, 2025

Still need help?

The Atlassian Community is here for you.