How to change MAIN branch in BitBucket?

Have a main branch in BitBucket named "trunk" (after import from SVN).

Also have branch named "master" - branched from "trunk".

How to set "master" the main branch in BitBucket and then delete "trunk" branch?

3 answers

1 accepted

4 votes
Robust I'm New Here Apr 05, 2014
git symbolic-ref HEAD refs/head/master
git branch -d trunk

refs/heads/master

NOT

refs/head/master

??

In Bitbucket UI:

  1. Select the repository
  2. Select Administration
  3. In Repository Details, set Main branch

Now delete unnecessary branches with git branch -d.

In the updated Bitbucket UI, select *Settings* instead of *Administration* in Step 2.

Check permissions if you don't see the "Settings" link.

0 votes

After changing the main branch - when cicking on "save reporistory details" i get a wired error:

"You can't create repositories under this account."

 

Suggest an answer

Log in or Join to answer

Stay in touch

Be the first to know what's trending on Atlassian Community