obsidian-sample-plugin
obsidian-sample-plugin copied to clipboard
Rename default branch `master` to `main`
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.
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.
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 :)
Yeah, thanks for the awareness, let's keep watching the situation as well.
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.
Thank you for the comment. Fortunately, Obsidian can work with both master and main branches, so developers can choose whichever they prefer!
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.
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.
For GitHub, the default branch has been main since 2020-10-01
I stand with master, this is my GitHub settings:

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 stand with
master, this is my GitHub settings: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)

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