I will continue to maintain that main is not a useful name. Neither is master, and has other problematic implications. So, I'm certainly not advocating using master.
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, or prod. I usually use prod for continuously deployed web apps, and stable for versioned projects.
For projects where the default branch represents the main development branch, it should be named develop or development.
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.
Git v2.28 introduced the
init.defaultBranchconfig 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
mainis 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 useprodfor continuously deployed web apps, andstablefor versioned projects.For projects where the default branch represents the main development branch, it should be named
developordevelopment.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. π―