使用名称中的短划线删除git上的远程分支

时间:2012-10-12 20:35:09

标签: git

我无法删除名称中包含短划线的远程分支。

git push origin :paul-ms
error: unable to push to unqualified destination: paul-ms
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.
error: failed to push some refs to 'git@github.com:blah/blah.git'

git push origin --delete 'paul-ms'
error: unable to push to unqualified destination: paul-ms
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.
error: failed to push some refs to 'git@github.com:blah/blah.git'

1 个答案:

答案 0 :(得分:6)

使用:git push origin :refs/heads/paul-ms

请参阅:Git - The Refspec