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

Rename "master" branch to "main"

Open rebeccahum opened this issue 4 years ago • 1 comments
trafficstars

With the direction of the "master" term being deprecated in favour of something more ambiguous such as "main" (more context: https://sfconservancy.org/news/2020/jun/23/gitbranchname/), VIPCS should follow suit.

This shouldn't be done until at least 3.0 though since it is a breaking change — any builds that reference master will need to updated properly.

rebeccahum avatar Apr 19 '21 18:04 rebeccahum

I'm in favour of a rename.

There are various common, alternative names though, which each have their own pros and cons. Probably a good idea to consider the various options and to discuss these, before taking a decision on the new branch name.

Here are some typical ones. Happy to hear of more alternatives and for more pros/cons being added.

main

Pros:

  • Already chosen as alternative name by a large group of people, causing familiarity.
  • Easy for discovery and to switch to for people who use the git command line with auto-complete

Cons:

  • Non-descript
  • I seem to remember some objections regarding inclusiveness against main as well when the big discussions were raging, but I can't currently find a link.

trunk

Pros:

  • Familiar for those who come from SVN.
  • Fits in with the "tree with branches" metaphor

Cons:

  • No intuitive switch-over when using autocomplete
  • Not intuitive for anyone who has never used SVN

stable

Pros:

  • Especially when combined with develop (like in this repo), describes exactly what one gets.

Cons:

  • No intuitive switch-over when using autocomplete

version-based

Pros:

  • Helpful when people are used to semver and want to use the latest, but only from the same major.
  • Helpful when a project has a maintenance policy which states that older "majors" still have active support for a period of time after a new major was released.

Cons:

  • Fiddly
  • Typical reasons to choose this naming scheme do not really apply to this project.

How ?

For a good step by step tutorial on how to do the rename, see: https://www.hanselman.com/blog/easily-rename-your-git-default-branch-from-master-to-main

In addition to the steps in the above tutorial, in my experience, the following additional steps are needed:

  • [ ] Update the GH Actions workflows - the on: key often refer to branch names to determine whether a workflow needs to run. Those references will need to be updated.
  • [ ] Update the branch protection in the "Settings" of the repository.
  • [ ] Update contributor and release documentation which often also has references to branch names.
  • [ ] Existing contributors/forks may need to update the branch being tracked for locally checked out branches.

jrfnl avatar Apr 20 '21 04:04 jrfnl

Closed with #789,

GaryJones avatar Aug 31 '23 15:08 GaryJones