Cloné un proyecto global
git clone https://github.com/lornajane/scripts.git scripts
Y agregué una twig remota
git remote add gitlab http://ankits@abc.xyz/janedoe/my.git git push gitlab master -f
Ahora el problema es que ya no tengo el proyecto http: //ankits@abc.xyz/janedoe/my.git en gitlab.
Entonces, cuando intenté eliminar una twig remota
git push gitlab --delete master
Tengo un 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/master To http://ankits@abc.xyz/janedoe/my.git ! [remote rejected] master (deletion of the current branch prohibited)
¿Cómo eliminar este control remoto? ¡Gracias!
Agregaste el repository git remote
con el git remote
con add
para que puedas eliminarlo con rm
. Pruebe git remote --help
para get una list completa.
git remote rm gitlab
debería funcionar para lo que quieres hacer.
No puede borrar la twig actual "HEAD" remota.