obsidian-sample-plugin icon indicating copy to clipboard operation
obsidian-sample-plugin copied to clipboard

Rename default branch `master` to `main`

Open thesophiaxu opened this issue 3 years ago • 11 comments

Since GitHub renamed its default branch name to main, the default branch of this repository could also be main, since all newly created projects have the default name main but any project created from this template is still master - which can be confusing for people new to this.

thesophiaxu avatar Nov 27 '21 17:11 thesophiaxu

Honestly I hated this part from GitHub because git still uses master when you init a repo, so it's just a lot of confusion regardless. For now though, I haven't seen anyone complain about it, and it's actually easier to submit repos with master to our releases database since master is assumed by default so one does not have to add the additional "branch": "main" to the JSON file.

Will leave this issue open if anyone else runs into this. Feel free to leave a comment.

lishid avatar Nov 27 '21 18:11 lishid

Makes sense! I read a while ago that the Git maintainers are trying to switch to main as well, but it seems that the current version just adds a global switch to change the default branch: https://lore.kernel.org/git/[email protected]/

Feel free to close it if you like, or we can wait for someone else to chime in :)

thesophiaxu avatar Nov 27 '21 19:11 thesophiaxu

Yeah, thanks for the awareness, let's keep watching the situation as well.

lishid avatar Nov 27 '21 19:11 lishid

Just chiming in, I feel like one of Obsidian's true strengths is being platform agnostic. It's your data, and it doesn't care where you put it or how you manage it. In my opinion, creating fragmentation in order to be consistent with the decisions of the GitHub platform goes against that ethos.

The discussion around the default branch name has been covered thoroughly elsewhere and I'll leave that conversation to those participants, but I do think it's fair to say that main is the deviation from the norm, not master.

paarthenon avatar Nov 30 '21 19:11 paarthenon

Thank you for the comment. Fortunately, Obsidian can work with both master and main branches, so developers can choose whichever they prefer!

lishid avatar Nov 30 '21 20:11 lishid

When you install Git now, it actively encourages you to set the init.defaultBranch option to main. Keeping the original default branch name takes more effort, since you have to explicitly opt out.

I think at this point main is the norm, and given the reasons for the change, Obsidian probably ought to follow the trend.

00dani avatar Dec 30 '21 03:12 00dani

Thank you, that is a great data point. Looking at the docs, it seems that the default value is still master for now. Once git decides to permanently change defaultBranch's default value to main we will consider switching over.

lishid avatar Dec 30 '21 04:12 lishid

For GitHub, the default branch has been main since 2020-10-01

claremacrae avatar Apr 09 '22 19:04 claremacrae

I stand with master, this is my GitHub settings: image

which can be confusing for people new to this.

This is unlike other technical details that are necessary to know, it's a proof of how politics changes our life.

I think people should understand this, this is a proof of

reorx avatar Apr 15 '22 06:04 reorx

I stand with master, this is my GitHub settings: image

which can be confusing for people new to this.

This is unlike other technical details that are necessary to know, it's a proof of how politics changes our life.

I think people should understand this, this is a proof of

I created a meme about this (i didn't knew about this usefull "repository default branch" setting)

meme

svonjoi avatar Feb 27 '23 04:02 svonjoi

main as convention has broad adoption. Please rename the main branch to be called ... main.

quinn avatar Dec 15 '23 12:12 quinn