Switch current branch in git bare repository

Solution 1:

Try this instead of git checkout:

git symbolic-ref HEAD refs/heads/develop

Then you should be able to delete master.