Re:Could we please get back the master-branch on this reposi...
by Grollicus on Wednesday February 09, 2022 @01:41PM
(#30276535)
I'd expect you'd still create an empty repo (same as in the web UI) and then push the branches you want to push. You don't configure a branch name in the web ui as well.
But that's why I'm asking where OP found that and not just saying they're wrong.
€: There's also https://docs.github.com/en/rest/reference/repos#update-a-rep... where you can set the default_branch?
Here’s the API reference: https://docs.github.com/en/rest/reference/repos#create-an-or...
I don’t see any parameter for setting the default to master instead of main. However it does seem like you can change it after it has been created with a subsequent update call.