psugar
psugar

Reputation: 1885

Deleting remote branches on git with dash in name

I can't delete a remote branch that has a dash in the name.

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 '[email protected]: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 '[email protected]:blah/blah.git'

Upvotes: 3

Views: 832

Answers (1)

Manuel
Manuel

Reputation: 4228

Use: git push origin :refs/heads/paul-ms

See: Git - The Refspec

Upvotes: 6

Related Questions