I found this to be the best way of doing this (I had an issue with my server not letting me delete).
On the server that hosts the origin
repository, type the following from a directory inside the repository:
git config receive.denyDeleteCurrent ignore
On your workstation:
git branch -m master vabandoned # Rename master on local
git branch -m newBranch master # Locally rename branch newBranch to master
git push origin :master # Delete the remote's master
git push origin master:refs/heads/master # Push the new master to the remote
git push origin abandoned:refs/heads/abandoned # Push the old master to the remote
Back on the server that hosts the origin
repository:
git config receive.denyDeleteCurrent true
Credit to the author of blog post http://www.mslinn.com/blog/?p=772