WordPress-Coding-Standards icon indicating copy to clipboard operation
WordPress-Coding-Standards copied to clipboard

Rename master branch to some other naming

Open dingo-d opened this issue 4 years ago • 3 comments

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/

dingo-d avatar Jul 02 '20 06:07 dingo-d

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.

jrfnl avatar Jul 02 '20 13:07 jrfnl

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/

jeffpaul avatar Jul 02 '20 14:07 jeffpaul

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.

jrfnl avatar Jul 08 '20 22:07 jrfnl

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 the develop branch, clear indication what's what.
  • trunk - Pro: used by Core and other WP projects. Con: confusing as trunk is used by Core for the develop branch, not for the stable release branch.

Are there other options we should consider ?

Opinions welcome.

jrfnl avatar Nov 26 '22 15:11 jrfnl

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.

dingo-d avatar Nov 26 '22 15:11 dingo-d

main is fine with me.

GaryJones avatar Nov 27 '22 02:11 GaryJones