[SOLUCIONADO] remote: error: refusing to delete the current branch
Publicado por joel (36 intervenciones) el 13/05/2020 19:07:47
Al intentar eliminar una rama del servidor con el comando:
Me he encontrado con este error:
remote: error: By default, deleting the current branch is denied, because the next
remote: 'git clone' won't result in any file checked out, causing confusion.
remote:
remote: You can set 'receive.denyDeleteCurrent' configuration variable to
remote: 'warn' or 'ignore' in the remote repository to allow deleting the
remote: current branch, with or without a warning message.
remote:
remote: To squelch this message, you can set it to 'refuse'.
remote: error: refusing to delete the current branch: refs/heads/joel/develop
El problema ha sido que la rama joel/develop estaba como la rama HEAD por defecto...
La solución ha sido cambiarla en el servidor con:
Si deseamos visualizar la rama HEAD por defecto, podemos hacerlo así:
1
git push origin :joel/develop
Me he encontrado con este error:
remote: error: By default, deleting the current branch is denied, because the next
remote: 'git clone' won't result in any file checked out, causing confusion.
remote:
remote: You can set 'receive.denyDeleteCurrent' configuration variable to
remote: 'warn' or 'ignore' in the remote repository to allow deleting the
remote: current branch, with or without a warning message.
remote:
remote: To squelch this message, you can set it to 'refuse'.
remote: error: refusing to delete the current branch: refs/heads/joel/develop
El problema ha sido que la rama joel/develop estaba como la rama HEAD por defecto...
La solución ha sido cambiarla en el servidor con:
1
git symbolic-ref HEAD refs/heads/master
Si deseamos visualizar la rama HEAD por defecto, podemos hacerlo así:
1
git symbolic-ref HEAD
Valora esta pregunta


0