How to change the main branch

robotsnoindex


 

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

   

Summary

You may, at some point, wish to change the main branch used by your repository in Bitbucket Cloud.

Environment

Bitbucket Cloud repository 

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 Details and 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


If you are issues after following the steps within this article, please feel free to raise a support ticket or raise a community support ticket for further assistance.

Last modified on Mar 7, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.