Can't remove remote branch in git

The branch was set as default on github, preventing it from being deleted.

On github, I went to "Administration" in the project, reset the default branch to "master" and I was able to remove the xetex branch.


For what it's worth in BitBucket:

  • click on Settings in the left menu
  • under 'Repository Details' find 'Main Branch' drop down menu
  • select a different branch from the one you want to delete

There's also an option to prevent branch deletion under the 'Branch management' section, but you have to actively set that yourself first.