我需要删除一个主分支,但事实证明它很难.我只想清理那个分支并开始新的.我从开发分支删除.我希望GitHub上的主人干净.
# git push origin --delete master
> To https://github.com/mymasterb.git ! [remote rejected] master
> (deletion of the current branch prohibited) error: failed to push some
> refs to 'https://github.com/mymaster.git'
Run Code Online (Sandbox Code Playgroud)
我如何简单地用新鲜的石板开始我的主人?
如何从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'
Run Code Online (Sandbox Code Playgroud)
我也试过了
git push bb :master
Run Code Online (Sandbox Code Playgroud)
但这一切都行不通.