SecretNetwork icon indicating copy to clipboard operation
SecretNetwork copied to clipboard

Meta: Change default git branch from master to main

Open lacabra opened this issue 4 years ago • 0 comments

Summary

Change this repository's default git branch from master to main to improve inclusivity

Background

On 23 June 2020, the Software Freedom Conservancy published an announcement from its member project, the Git project. The Git project committed to changing the default branch name for new repositories from master to main in the upstream git software.

The context behind this change is the connection of the word "master" to the legacy of the American slavery system. More context is available in this CNN article, Everyday words and phrases that have racist connotations (7 Jul 2020).

Other Open Source hosting platforms and projects have taken similar measures. GitHub switched new repositories to use main as the default branch since October 2020. The Fedora Project began a process to update the default branch for tens of thousands of git repository branches starting in February 2021.

So, why not us too? 😄

Details

GitHub actually makes this easy, but it does come with a slight risk. Using GitHub's branch changer tool normally updates all pending Pull Requests to point to the new default branch. But if a particular Pull Request is out-of-date, it may create new merge conflicts that are forced after changing the default branch. It is a good idea to merge any large or significant changes in pending reviews before changing branches.

Here is how to do it:

  1. Go to repository settings, choose Branches from the sidebar.
  2. Click the pencil pencil button to edit the branch name
  3. Rename it to main, click Rename branch
  4. Done!

Double-check pending Pull Requests to see that they point to the new default branch.

Outcome

Secret Network development community aspires to a vision for free and open source software built by inclusive, welcoming, and open-minded communities.

lacabra avatar Jul 21 '21 09:07 lacabra