Hemos terminado de trabajar en una rama remota. Ya ha sido incorporada a producción y hay que borrarla.
Un compañero la ha borrado usando :
git push origin :rama_remota
Y, en efecto, ya no aparece en la interfaz web del repositorio. Ni al hacer un clone.
Pero remotes/origin/rama_remota
sigue apareciendo en mi repositorio local y si intento borrarla tengo este error :
git push origin :rama_remota
error: unable to push to unqualified destination: rama_remota
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.
fatal: The remote end hung up unexpectedly
error: failed to push some refs to 'git@mirepo.es:GIT/REPO.git'
Podría eliminarla usando prune:
#Primero miro cuales se borarrían
git remote prune origin --dry-run
#Luego las borro
git remote prune origin
Pero resulta que hay bastantes ramas así. Y quiero borrar esta rama individual ahora y las otras cuando tenga tiempo de revisarlas.