git – 删除远程主分支,由于当前分支而拒绝

如何从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
To ssh://git@bitbucket.org/user/reponame.git
 ! [remote rejected] master (deletion of the current branch prohibited)
error: failed to push some refs to 'ssh://git@bitbucket.org/user/reponame.git' 

我也试过

git push bb :master

但所有这一切都不行。

最佳答案
注意:对于BitBucket,您可以通过访问仓库的设置,并在“主分支”组合框中更改分支来更改默认分支。

一旦主分支不再是主分支,那么you can push and remove master

转载注明原文:git – 删除远程主分支,由于当前分支而拒绝 - 代码日志