删除远程主分支,由于当前分支而拒绝 [英] Deleting remote master branch, refused due to being current branch
本文介绍了删除远程主分支,由于当前分支而拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何从GitHub / Bitbucket中删除远程主分支?
我想:
#git push bb --delete master
remote:bb / acl:user is allowed。 [K
remote:error:拒绝删除当前分支:refs / heads / master [K
to ssh://git@bitbucket.org/user/reponame.git
! [远程拒绝]主控(删除当前分支禁止)
错误:无法将某些参考推送到'ssh://git@bitbucket.org/user/reponame.git'
另外我试过
git push bb:master
但这一切都不行。
BitBucket ,您可以通过访问repo的设置来更改默认分支,并在
主要分行
组合框。
一旦主分支不再是主分支,那么你可以推动并删除主人。
How do I delete a remote master branch from GitHub/Bitbucket?
I'm trying:
# 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'
Also I tried
git push bb :master
But all this is not work.
解决方案
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.
这篇关于删除远程主分支,由于当前分支而拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文