I cloned a global project
git clone https://github.com/lornajane/scripts.git scripts
And I added remote branch
git remote add gitlab http://ankits@abc.xyz/janedoe/my.git
git push gitlab master -f
Now the problem is I don't have http://ankits@abc.xyz/janedoe/my.git project anymore on gitlab.
So when I tried deleting remote branch
git push gitlab --delete master
I got 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)
How do remove this remote. Thanks!