How I learned about the main branch
When I started to code in March this year, I have always used the master branch as my default branch...
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
Git v2.28 introduced the
init.defaultBranch
config so now you can also set it locally as well. πΒ πGithub wrote a blog post about that you can read - "Introducing init.defaultBranch". π
Thank you, Kim, for adding that.
I didn't know about it. π₯
It's nice!!!
I will continue to maintain that
main
is not a useful name. Neither ismaster
, and has other problematic implications. So, I'm certainly not advocating usingmaster
.The thing is, we name all of our other branches according to their purpose, so why not the default branch? In my opinion, the default branch should also be named according to how it's used.
For projects where the default branch represents the stable code, it should be named something like
stable
, orprod
. I usually useprod
for continuously deployed web apps, andstable
for versioned projects.For projects where the default branch represents the main development branch, it should be named
develop
ordevelopment
.Thanks for your input, Dan. β
Yes, it's true.
Different teams or organization name their branches differently. π―π
Develop branch is common especially for features underdevelopment etc.
I do. In all my projects. π
Someone created a cool web app/tool to automatically rename the default remote branches in all your repositories: eyqs.ca/tools/rename
That's amazing. Thanks for sharing Nathan. π
Hey, you can use the link I provided in the post to take a look. π―