origin/feat
的分支。我尝试使用git push --delete origin feat
命令,但是 Git 报错:remote: error: By default, deleting the current branch is denied, because the next
remote: 'git clone' won't result in any file checked out, causing confusion.
remote:
remote: You can set 'receive.denyDeleteCurrent' configuration variable to
remote: 'warn' or 'ignore' in the remote repository to allow deleting the
remote: current branch, with or without a warning message.
remote:
remote: To squelch this message, you can set it to 'refuse'.
remote: error: refusing to delete the current branch: refs/heads/feat
好的,明白了,那我就尝试使用 git checkout master
切换到origin/master
分支,结果告诉我:Already on 'master'
。当前分支是否也需要在远程目录中设置?我应该如何设置呢?
git push origin --delete <:branch_name>
。 - Charles