I created a brand new repository using the branch name "main" instead of "master". Everything seemed to be going fine when I sent it to sourcehut. I could see all the files online. However, when I tried to set its README file as the README for a project, viewing the project page would actually show a blank space where the README should be. Other repos which only had the branch "master" would show up fine, but not this one which only had the branch "main". I renamed the branch using from "main" to "master" using `git branch -m` and pushed it, so remote now has both "master" and "main" for the repo. The correct README instantly appeared on the project. I then renamed my local branch from "master" back to "main", set its upstream, and then attempted to delete the remote "master" branch with `git push origin :master`. This normally works, however I encountered this error, and cannot delete the "master" branch: remote: error: By default, deleting the current branch is denied, because the next remote: 'git clone' won't result in any file checked out, causing confusion. remote: remote: You can set 'receive.denyDeleteCurrent' configuration variable to remote: 'warn' or 'ignore' in the remote repository to allow deleting the remote: current branch, with or without a warning message. remote: remote: To squelch this message, you can set it to 'refuse'. remote: error: refusing to delete the current branch: refs/heads/master Looks like a problem with sourcehut. I'm not sure if this is the right place to post bug reports, but other people seem to be posting their annoyances here, so I assume I'm in the right place.
We don't presently support naming your primary branch anything other than "master".
Okay, thanks for the reply. I'll keep that in mind when I create repos in future.
Hi Cadence! As of git.sr.ht 0.55.0, so roughly yesterday, any branch name is first-class-supported as being the default, and you can change it either on the settings page, or semi-automagically by removing the current default branch and pushing another in one fell swoop: git push origin :master HEAD:trunk Best, наб Please keep me in CC as I'm not subscribed.
Whoa, okay, awesome! I will definitely have to try this out. Thanks! -- Cadence