I just created a new repo with just a master branch. Where does Github force anything?
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?
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?
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.
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?
They are just going along the git default, so yes, a new repo will be on main branch by default.