In a git project I did some refactoring in a branch and now this branch should be a new project. I moved this project from github to bitbucket. Now I want to delete the old master and make the refactoring branch the new master.
I tried to delete the master:
$ git branch -D master
Deleted branch master (was a947288).
$ git push origin :master
remote: error: refusing to delete the current branch: refs/heads/master
! [remote rejected] master (deletion of the current branch prohibited)
In the bitbucket frontend I couldn't delete the master neither. So how could I achive that? Or do I have to create a new project and push the refactoring branch into its master?