To edit a repository, go to Project settings > Git settings, and click Edit next to the repository you wish to edit.
To set another branch as the default branch, you can select the drop-down menu on the Default branch section and select the branch to set as the default branch.
Then, you can click on Update Repository or Delete This Repository, depending on your desired action.
Note: If you click on Delete This Repository, a browser prompt will popup to confirm your action. Deleting the repository will delete all data in it and this action cannot be undone.