$ git branch -a
* SocialAct
master
remotes/origin/HEAD -> origin/master
remotes/origin/SocialAct
remotes/origin/social
I want to delete
I had this error (from above):
Thanks. Actually I noticed this solution and tried earlier. But this gives following error... $ git push origin :heads/socail Enter passphrase for key '/h/.ssh/id_rsa': error: unable to push to unqualified destination: heads/socail 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@xxxxxx.git' – Himel May 24 '10 at 9:37
It seemed to have gotten confused about whether or not I had actually deleted it remotely. I worked around it like so:
git push origin HEAD:branch_to_delete
git push origin :branch_to_delete
That worked for me. Using: git version 1.7.3.1.msysgit.0.