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

Change default base branch: master -> main #675

Closed
janosh opened this issue Nov 22, 2021 · 3 comments · Fixed by #776
Closed

Change default base branch: master -> main #675

janosh opened this issue Nov 22, 2021 · 3 comments · Fixed by #776

Comments

@janosh
Copy link
Contributor

janosh commented Nov 22, 2021

Since GitHub changed the name of the default branch on new repos to main on Oct 1, 2020, changesets might consider updating the default baseBranch to match:

$ yarn changeset init
$ cat .changeset/config.json
{
  "$schema": "https://unpkg.com/@changesets/config@1.6.2/schema.json",
  "changelog": "@changesets/cli/changelog",
  "commit": false,
  "linked": [],
  "access": "restricted",
- "baseBranch": "master",
+ "baseBranch": "main",
  "updateInternalDependencies": "patch",
  "ignore": []
}
@Andarist
Copy link
Member

There are might be couple of places in the codebase where we default to master - and I think we can't change them right now, in the current major version, because that would be a breaking change. The init command, IMHO, can be changed though - because this is targeting new users.

@janosh would you like to prepare a PR with such a change?

@BryanAdamss
Copy link

Can baseBranch set multiple values?
like
baseBranch:["main","master"]

@Andarist
Copy link
Member

I somewhat doubt it (I think that some code might depend on this being a single value and this might not be that easy to change without introducing breaking changes). What that would even mean though?

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