question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: Changing the default branch (`master`) to `main`?

See original GitHub issue

In the wake of recent events, a good part of the git-using community is converging to use main as the name for the default branch instead of master. Some related discussion:

https://twitter.com/mislav/status/1270388510684598272?s=21 https://mail.gnome.org/archives/desktop-devel-list/2019-May/msg00066.html

And github seems to be changing the default branch to main: https://twitter.com/natfriedman/status/1271253144442253312

Right now on our repo we have:

$ git grep master | wc
    122     771   13973

and most of them are references to our master branch.

This issue is for us to talk about whether or not we want to change the name of the default branch, and if yes, to what, and how.

I’m personally in favor of main, but I also understand the implications of all the scripts out there which rely on the name of the main branch. So I’d propose creating a new main branch, changing the default branch in github to main, but not delete the master branch for a good while, and have a part of the CI keep rebasing deprecated master with main.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:20 (18 by maintainers)

github_iconTop GitHub Comments

3reactions
jnothmancommented, Jan 24, 2021

Thanks for your input @readyready15728 https://github.com/readyready15728. Which “we” are you referring to? I can’t identify your prior involvement in the Scientific Python developer community. Welcome!

As a descendant of Holocaust survivors, I am certainly sensitive to the situation in Xinjiang, and it is frustrating how much we don’t know, and how little is being done about it. But “that have crematoria attached to them” seems to be an exaggeration of the available reputable evidence. You seem to be here to push a particular agenda, rather than to comment truly on the issue at hand.

Having said that, and as someone with a background in linguistics, I am not especially persuaded by the change of terminology away from “master” in the context of git, and fear that we are causing ourselves some trouble for a perhaps-short-term popular/political interest. Our determination to change it was not made solely on the basis of sociopolitical concerns, but also practically, because GitHub has set this as the new normal, and we see no need to differ. (GitHub is MSFT, not AAPL.)

3reactions
rthcommented, Jan 22, 2021

Should we have a master branch that stays in sync in main?

I haven’t closely followed this subject but I imagine not. Having both would create confusion and likely break redirects that are enabled with that button.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to rename the "master" branch to "main" in Git
have to change the "default" branch or remove any "protected" status for "master". You will then be able to delete the old "master"...
Read more >
5 steps to change GitHub default branch from master to main
Step 1 - Move the master branch to 'main' · Step 2 - Push 'main' to remote repo · Step 3 - Point...
Read more >
Changing git default branch from master to main on command ...
So my question (finally) is how do I repoint my remote branch to main so I can delete master , locally and remotely?...
Read more >
Why GitHub renamed its master branch to main | TechTarget
GitHub renamed the master branch to main for any Git repository, as it addresses cultural change like so many organizations that have nixed ......
Read more >
git how to change default branch for everything I do?
Following the FAQ article "How to Rename the master branch to main in Git", and the GitHub documentation itself, you can:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found