为什么不能用git push origin删除一个远程git分支:branchname?

当我尝试推到一个远程git分支删除它与git push origin:branchname我得到以下错误消息:

error: unable to push to unqualified destination: remotes/origin/branchname
The destination refspec neither matches an existing ref on the remote nor
begins with refs/, and we are unable to guess a prefix based on the source ref.

但是当我输入git branch -a时,我仍然看到它在远程/ origin / branchname.为什么我无法远程删除?

该分支已经在原始存储库中被删除.您可以通过执行git fetch –all –prune来抓取本地遥控器,从而将其从您的遥控器中删除.您还可以更具体地做git远程修剪,只是修剪你的遥控器而不更新.
翻译自:http://stackoverflow.com/questions/6783917/why-cant-i-delete-a-remote-git-branch-with-git-push-origin-branchname

转载注明原文:为什么不能用git push origin删除一个远程git分支:branchname?