我有一个本地存储库,我想镜像到远程'websrv'。这曾经工作正常,直到我删除了一个本地分支。现在当我这样做
git push --mirror websrv
我明白了
remote: error: By default, deleting the current branch is denied, because the next
remote: error: 'git clone' won't result in any file checked out, causing confusion.
remote: error:
remote: error: You can set 'receive.denyDeleteCurrent' configuration variable to
remote: error: 'warn' or 'ignore' in the remote repository to allow deleting the
remote: error: current branch, with or without a warning message.
remote: error:
remote: error: To squelch this message, you can set it to 'refuse'.
remote: error: refusing to delete the current branch: refs/heads/ecoli-moments
To git@141.89.117.199:~/baki_tracking.git
! [remote rejected] ecoli-moments (deletion of the current branch prohibited)
分支'ecoli-moments'指向与master,local和remote相同的提交。
我该怎么办才能正确删除远程分支?
更新:
远程存储库是裸的,我检查了服务器上的目录(配置文件有bare = true)。