Re:Could we please get back the master-branch on this reposi...
by JimDabell on Wednesday February 09, 2022 @01:21PM
(#30276128)
Perhaps you missed that the person you are replying to was talking about the GitHub API and not their web interface?
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.
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?
Re:Could we please get back the master-branch on this reposi...
by Jiejeing on Wednesday February 09, 2022 @12:37PM
(#30275456)
edit: my bad, I expected it to be the case but it turns out I had it in my gitconfig instead.
They are just going along the git default, so yes, a new repo will be on main branch by default.
Re:Could we please get back the master-branch on this reposi...
by JimDabell on Wednesday February 09, 2022 @12:47PM
(#30275592)
No, the Git default is still master. GitHub changed their default to main.
Re:Could we please get back the master-branch on this reposi...
by Jiejeing on Wednesday February 09, 2022 @01:00PM
(#30275798)
Right, I was confused by my .gitconfig.
Re:Could we please get back the master-branch on this reposi...
by JimDabell on Wednesday February 09, 2022 @01:13PM
(#30276006)
No, this is still incorrect. It’s not the future default either. Nobody has made the decision to change the default at present.
Re:Could we please get back the master-branch on this reposi...
by zerocrates on Wednesday February 09, 2022 @12:39PM
(#30275485)
It's just that, and the "create a first commit/branch/README for me" thing it can do presumably does that with "main" now also.
They're sure suggesting it - their suggested commands to initialize a new repo will create a main branch. But you can just ignore that suggestion?