Skip to content

Change default base branch: master -> main #675

Closed

Description

@janosh

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/[email protected]/schema.json",
  "changelog": "@changesets/cli/changelog",
  "commit": false,
  "linked": [],
  "access": "restricted",
- "baseBranch": "master",
+ "baseBranch": "main",
  "updateInternalDependencies": "patch",
  "ignore": []
}

Activity

  1. Andarist commented on Nov 22, 2021

    @Andarist
    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?

  2. BryanAdamss commented on Dec 29, 2021

    @BryanAdamss

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

  3. Andarist commented on Dec 29, 2021

    @Andarist
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions