Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename default branch master to main #20

Open
thesophiaxu opened this issue Nov 27, 2021 · 11 comments
Open

Rename default branch master to main #20

thesophiaxu opened this issue Nov 27, 2021 · 11 comments

Comments

@thesophiaxu
Copy link

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.

@lishid
Copy link
Collaborator

lishid commented Nov 27, 2021

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.

@thesophiaxu
Copy link
Author

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 :)

@lishid
Copy link
Collaborator

lishid commented Nov 27, 2021

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

@paarthenon
Copy link

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.

@lishid
Copy link
Collaborator

lishid commented Nov 30, 2021

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

@00dani
Copy link

00dani commented Dec 30, 2021

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.

@lishid
Copy link
Collaborator

lishid commented Dec 30, 2021

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.

@claremacrae
Copy link
Contributor

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

@reorx
Copy link
Contributor

reorx commented Apr 15, 2022

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

@svonjoi
Copy link

svonjoi commented Feb 27, 2023

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

@quinn
Copy link

quinn commented Dec 15, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants