Git 2.28 dropped yesterday (July 27, 2020) and it brings a nifty feature to set a default branch.
$ git config --global init.defaultBranch main
Any projects initialized with git init
will now use the branch name main
.
For more highlights of Git 2.28: https://github.blog/2020-07-27-highlights-from-git-2-28/
Top comments (8)
Timely
It shouldn't be too difficult to adjust to. I'm glad they decided on
main
. More or less,main
does have the same semantics asmaster
—minus the potential to hint at certain controversial topics.I didn't ever want to be racist, it's just a word that lets me checkout some code 😭, I live in Bristol UK where we pull down statues of slave traders, BLM support here is strong, it's making me reevaluate a few things. Maybe master is derived from slavery after all?
Don't worry, your choice of branch name doesn't make you racist. It's about how you treat others. Don't overthink it.
You are overthinking it. I also think this has been blown way out of proportions really.
I don't think I've ever read anywhere online (before this became big news this year) that people were considering
master
as a insulting term for a branch name when using version control.I know it's easy to change the master branch name in a git repository, but this whole thing feels like "solving" a problem that doesn't really exist.
Unfortunately for someone that might start learning git, this whole "dropping master" thing will could make it super confusing based on all existing tutorials and learning material.
I'm with you.
Our default branch is "development" and because we can have different versions in different environments, we've never used the "master" branch.
Branches don't have subordinates so the race debate isn't really appropriate here. All branches end up in the "Dev" branch after MR, so they're all equal.
That we can now configure the default, just means I don't have to delete a local branch when starting a new project. Whoopie. I'll probably forget & try anyway the first 20 or so times.
The original intention of the term in the context of git is as in "master record".
Honestly, this won’t influence me at all. If I unit or push, I only really have to type ‘add remote origin’. You won’t see the branch name if ever if you’re a solo Dev on small projects.
Some comments have been hidden by the post's author - find out more