Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename "master" branch to "main" #666

Closed
rebeccahum opened this issue Apr 19, 2021 · 2 comments · Fixed by #789
Closed

Rename "master" branch to "main" #666

rebeccahum opened this issue Apr 19, 2021 · 2 comments · Fixed by #789

Comments

@rebeccahum
Copy link
Contributor

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 rebeccahum added this to the 3.x milestone Apr 19, 2021
@jrfnl
Copy link
Collaborator

jrfnl commented Apr 20, 2021

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.

@GaryJones
Copy link
Contributor

Closed with #789,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants