How do I delete a remote master branch from GitHub/Bitbucket?
# git push bb --delete master
remote: bb/acl: user is allowed. accepted payload.[K
remote: error: refusing to delete the current branch: refs/heads/master[K
! [remote rejected] master (deletion of the current branch prohibited)
error: failed to push some refs to 'ssh://firstname.lastname@example.org/user/reponame.git'
git push bb :master
Note: for BitBucket, you would change the default branch by accessing the settings of your repo, and changing the branch at the "
Main branch" combo box.
Once the main branch is no longer master, then you can push and remove master.