I am having an issue with a git remote branch that refuses to be deleted.
As per this answer, I have deleted my local branch with git branch -d qa without any issues, but when I run git push --delete origin qa to delete the remote branch I get the error:
! [remote rejected] qa (refusing to delete the current branch: refs/heads/qa)
I get the same error when running git push origin :qa, and when I try to force the deletion with git push --force origin :qa or the variation of git push origin --delete --force qa.
Does anyone know to to force the deletion of the remote branch?
If it is relevant, I am running git version 2.17.1
Thanks!
Update:
The issue was that qa was set as the default branch. In my repository I went to Settings > Branches > Default Branch and changed it to master, which allowed me to run git push --delete origin qa with no errors.

