WordPress-Coding-Standards
WordPress-Coding-Standards copied to clipboard
Rename master branch to some other naming
Following the previous issue, we should also think about remaining master
branch to something other like main
.
Suggestions are welcomed for the naming ofc.
Some references:
https://dev.to/_garybell/why-github-renaming-master-is-good-4b64/
https://www.zdnet.com/article/github-to-replace-master-with-alternative-term-to-avoid-slavery-references/
https://www.cnet.com/news/microsofts-github-is-removing-coding-terms-like-master-and-slave/
What with WP Core still using SVN, I have a feeling that trunk
would be an intuitive alternative name for master
to consider for this repo.
For the practical side of things:
- Follow the steps outlined here: https://www.hanselman.com/blog/EasilyRenameYourGitDefaultBranchFromMasterToMain.aspx
- Adjust the Travis script to make sure any conditions for the stages and such match against the new name.
- Adjust the references in the badges in the Readme.
- Do a repo-wide search to see if there are other references which need adjusting.
Based on this proposal in core, I'd recommend we stick with trunk
: https://make.wordpress.org/core/2020/06/18/proposal-update-all-git-repositories-to-use-main-instead-of-master/
I've just added this to the 3.0.0
milestone as this could be considered a breaking change for those people using git clone or non-version based Composer restraints, like dev-master
.
I suggest we hash out the name in the near future and make the actual change just before the 3.0.0 release and annotate it clearly in the Changelog.
As we're getting closer to being able to release 3.0.0, I think we need to hash out what the new name for the branch will be so it can be renamed ahead of the release (just before, see comment above).
For the actual renaming, we can use the GH native branch rename functionality (wasn't available at the time the issue was opened, but is now).
Options:
-
main
- Pro: used a lot elsewhere and allows for auto-complete of the branch name on the CLI. -
stable
- Pro: goes well together with thedevelop
branch, clear indication what's what. -
trunk
- Pro: used by Core and other WP projects. Con: confusing astrunk
is used by Core for thedevelop
branch, not for the stable release branch.
Are there other options we should consider ?
Opinions welcome.
I'm always for main
as that's the most used naming for a production-ready branch in almost all the projects I know of.
main
is fine with me.