News for hackers. Stuff that matters.
Re:Could we please get back the master-branch on this reposi... by Havoc on Wednesday February 09, 2022 @12:06PM (#30275041)
I've found the resulting mix of master and main to be even more problematic. Now script etc need if statements etc
Re:Could we please get back the master-branch on this reposi... by deknos on Wednesday February 09, 2022 @12:16PM (#30275175)
i think it's even funnier, that production systems do not use their own copy/fork of such repositories.. and it QUITE shows, how we parasitize from each other.

How can you expect a foreign system (which you can clone!) to always adhere to your standards, when there's not even a formal declaration what they will do and which migration standards they will follow.

i mean i can understand that for the garage-hobby-project.. for projects like yocto which are used by companies.. well the companies should pay yocto some money, so they at least can buy storage/whatever at github or another repository place.

Re:Could we please get back the master-branch on this reposi... by pnathan on Wednesday February 09, 2022 @12:25PM (#30275294)
yocto is also an embedded system, where you should be taking care of these things tidily, because your target devices are not always trivially updatable and often have longer lifetime cycles than revs of normal software
Re:Could we please get back the master-branch on this reposi... by deknos on Wednesday February 09, 2022 @02:01PM (#30276849)
YES! EXACTLY!
Re:Could we please get back the master-branch on this reposi... by Havoc on Wednesday February 09, 2022 @02:02PM (#30276879)
Haha truth be told this is on my selfhosted gitlab and I just don't know how to rename it. The old ones are master new repos main
Re:Could we please get back the master-branch on this reposi... by totony on Wednesday February 09, 2022 @12:08PM (#30275065)
Yeah, ive had issues with repos on github having master and new ones having main. Github api seems to force the default branch to main (on new repos) making fixing this harder as well.

It's not that big of a deal but sure is a hassle.

Re:Could we please get back the master-branch on this reposi... by Grollicus on Wednesday February 09, 2022 @12:25PM (#30275295)
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?

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.
Re:Could we please get back the master-branch on this reposi... by totony on Wednesday February 09, 2022 @01:01PM (#30275815)
As @zerocrates mentioned, it's about the github auto commit feature when creating a new repo. This makes bootstrapping using terraform more complicated.
Re:Could we please get back the master-branch on this reposi... by wutbrodo on Wednesday February 09, 2022 @12:18PM (#30275204)
> Github api seems to force the default branch to main (on new repos)

Jesus, really? I didn't pay much attention to the master nonsense because I figured it would be limited to projects who cared more about social performance than building something useful, but it sounds like it's being forced at the platform-level onto every project.

OTOH, the impact is mitigated for new projects

Re:Could we please get back the master-branch on this reposi... by totony on Wednesday February 09, 2022 @01:02PM (#30275847)
I may have misspoken, you can change the default branch after the fact, my issue was with the "auto-create README" feature
Re:Could we please get back the master-branch on this reposi... by sebazzz on Wednesday February 09, 2022 @03:06PM (#30277711)
There is a HEAD ref which represents the default branch, and points to master, main, develop or whatever.
Re:Could we please get back the master-branch on this reposi... by boardwaalk on Wednesday February 09, 2022 @02:03PM (#30276886)
If you were assuming ‘master’ you were probably already making a bad assumption. I’ve seen projects that use ‘dev’, ‘develop’, etc, etc. I’d consider it a good thing to make your scripts less fragile.
Re:Could we please get back the master-branch on this reposi... by japhib on Wednesday February 09, 2022 @12:18PM (#30275197)
An if statement???? Can you imagine? Next thing you know we'll need VARIABLES
Re:Could we please get back the master-branch on this reposi... by Havoc on Wednesday February 09, 2022 @02:06PM (#30276927)
More branching logic means more opportunity for bugs. Even if it is just an if statement.

From a pure bug perspective this change has literally only downsides