@shyann
To change the main branch in Bitbucket, you will need to follow these steps:
- Log in to your Bitbucket account and select the repository you want to change the main branch for.
- Click on the "Settings" tab in the repository menu.
- In the repository settings, go to the "Branching model" section.
- Look for an option called "Main branch" or "Default branch" and click on the edit button next to it.
- Select the branch you want to set as the main branch from the drop-down menu.
- Save your changes.
- You may also need to update your local repository to reflect the new main branch by running the following command in your terminal:
1
2
3
4
|
git branch -m old_branch new_branch
git fetch origin
git branch -u origin/new_branch new_branch
git push -u origin new_branch
|
After completing these steps, the main branch in your Bitbucket repository should be successfully changed.