无法在 git 中删除远程分支

rap*_*ink 29 git

我正在尝试使用 git 删除远程分支:

rpinson@rpinson:~/dev/charismanie$ git remote show origin 
* remote origin
  Fetch URL: git@github.com:raphink/Charismanie.git
  Push  URL: git@github.com:raphink/Charismanie.git
  HEAD branch: xetex
  Remote branches:
    master tracked
    xetex  tracked
  Local branch configured for 'git pull':
    master merges with remote master
  Local ref configured for 'git push':
    master pushes to master (up to date)
rpinson@rpinson:~/dev/charismanie$ git push origin :xetex
remote: error: refusing to delete the current branch: refs/heads/xetex
To git@github.com:raphink/Charismanie.git
 ! [remote rejected] xetex (deletion of the current branch prohibited)
error: failed to push some refs to 'git@github.com:raphink/Charismanie.git'
Run Code Online (Sandbox Code Playgroud)

有没有办法从“远程分支”列表中删除这个分支,以便我可以删除它?

rap*_*ink 49

该分支在 github 上设置为默认值,以防止其被删除。

在 github 上,我转到项目中的“管理”,将默认分支重置为“master”,然后我能够删除 xetex 分支。