Skip to content

Rename master branch #6478

Closed
Closed

Description

@outofambit

Update

Since this has gained traction recently, we wanted to update it to share that we chose development as our default branch name because it reflects the way we work more accurately. However, we don't think it's a good universal default branch name. main would likely be a better choice if you're planning to rename master (unless there's a more descriptive name you'd like to use that better reflects the way your team works).


Summary

I’d like to rename the branch master to development and use that going forward for our work.

From Problematic Terminology in Open-Source on master/slave terminology in software:

Use of this term is problematic. It references slavery to convey meaning about the relationship between two entities.

Removing this terminology from our workflow is a small gesture to include more people from marginalized groups in this project.

(I’m open to names other than development, though I do think it's a good fit for us now that we are in the practice of using release branches.)

Technical Steps

  • create development branch from master
  • make development the default GitHub branch
  • modify github/central to use development for release notes reloading
  • redirect PRs to development in desktop/desktop
  • move branch protections from master to development
  • modify docs to reference development instead of master
  • delete master branch to avoid confusion?

(Thanks to @gr2m for prior thinking on this process)

Related Issues and Projects

Activity

  1. added
    meta
    on Dec 21, 2018
  2. self-assigned this
    on Dec 21, 2018
  3. shiftkey commented on Dec 21, 2018

    @shiftkey
    Member

    In my head I'd always taken "master" to be borrowed from the concept of "master copy". I wanted to see if the Git contributors ever documented it somewhere but I couldn't find an early Git commit that mentions why master was chosen in that very first version. Maybe there's a mailing list thread, but at this point it's archaeological (Git is almost 14 years old since that first very first commit was created) and it's for my curiosity more than anything.

    So let's do it.

    I'm 👍 on the rename for few other reasons:

    • words have meaning, and need to be appreciated in a wider context than "it's just code"
    • good names have value, and if there's a name that better describes what the default branch represents to us we should use it
    • by using a different branch to master for the desktop repository we're also developing and testing that GitHub Desktop has no leftover assumptions about the presence of a master branch

    (I’m open to names other than development, though I do think it's a good fit for us now that we are in the practice of using release branches.)

    This is a chance for us to think about what the default branch represents - if it's going to be the latest, bleeding-edge code then the name should reflect that.

    I'm 👍 to development or even dev to save some keystrokes, but I'll let others chime in if they've got bright ideas.

  4. j-f1 commented on Dec 21, 2018

    @j-f1
    Contributor

    main?

  5. gr2m commented on Dec 21, 2018

    @gr2m

    Hey thanks for pinging me! I love that you do this, I plan to do this myself. I've made a library that hopefully makes this a little easier: https://github.com/gr2m/octokit-rename-branch.

    It automates a few of the steps you need to take, like updating all pull-request bases. Let me know if you have any questions or suggestions to further improve the script :)

  6. say25 commented on Dec 22, 2018

    @say25
    Member

    I have always been partial to the term trunk. Branches go off the trunk of a tree until they are no longer valid and are cut off.

  7. shiftkey commented on Dec 22, 2018

    @shiftkey
    Member

    I have always been partial to the term trunk. Branches go off the trunk of a tree until they are no longer valid and are cut off.

    Trunk Driven Development is also a great read if you want to learn more about this flow.

    I actually like this more than development, so that's currently got my vote.

  8. billygriffin commented on Dec 23, 2018

    @billygriffin
    Contributor

    Thanks @outofambit for kicking this off! In terms of the actual name, I don't have super strong feelings. I'd just say that as someone who has done some engineering but not a ton (and therefore more junior as a dev), trunk isn't super intuitive to me as the default branch - though I do understand the concept especially after the explanation.

    Regardless of what we use, I'm glad we're now using release branches, which makes the idea of this as the default branch but not what we release from 👍 .

  9. pinned this issue on Dec 24, 2018
  10. suphanatnack commented on Dec 25, 2018

    @suphanatnack
  11. outofambit commented on Dec 26, 2018

    @outofambit
    ContributorAuthor

    I think i'm leaning towards main or development now. While I like the metaphor for trunk, I share @billygriffin's concern that it may be less legible to newer users.

  12. outofambit commented on Dec 27, 2018

    @outofambit
    ContributorAuthor

    ok, i've opened all requisite PRs. will make the actual change of default branch to development in a couple hours and then redirect all PRs to point at that instead of master.

  13. gr2m commented on Dec 27, 2018

    @gr2m

    @outofambit make sure to also update branch protection and the repository’s default branch

  14. outofambit commented on Dec 27, 2018

    @outofambit
    ContributorAuthor

    @gr2m yes thank you! i had made a mental note of that but forgot to add it to the list above. updated!

  15. shiftkey commented on Jan 3, 2019

    @shiftkey
    Member

    Just a heads up: I had to change a couple of non-config settings around this change because PRs were not being run as usual:

    • Azure Pipelines config was still using master as the default branch
    • Codecov.io settings were still using master as the default branch
  16. outofambit commented on Jan 7, 2019

    @outofambit
    ContributorAuthor

    thanks for taking care of that and updating us, @shiftkey!

  17. outofambit commented on Jan 7, 2019

    @outofambit
    ContributorAuthor

    I've deployed the remaining changes to central and deleted the master branch from this repo. Will close this issue once github/central#424 is merged. Thanks all!

  18. unpinned this issue on Jan 8, 2019
  19. outofambit commented on Jan 8, 2019

    @outofambit
    ContributorAuthor

    all done! ✨

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

Metadata

Metadata

Assignees

Labels

meta

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions