And finally, to delete a ref, use

    git update-ref -d refs/<refname>

Delete all refs! :P (Well, except for HEAD. HEAD is special.)