Set the default branch for newly-created repositories

You can now set the default branch name for newly-created repositories under your username. This setting does not impact any of your existing repositories. Existing repositories will continue to have the same default branch they have now.

Organization and enterprise administrators can also set the default branch name for new repositories created in their organization or enterprise. Enterprise administrators can also enforce this setting across all their organizations or allow individual organizations to choose their own.

On October 1, 2020, if you haven't changed the default branch for new repositories for your user, organization, or enterprise, it will automatically change from master to main. You can opt out of this change at any time:

  1. For users, on the https://github.com/settings/repositories page
  2. For organization owners, on the https://github.com/organizations/YOUR-ORGANIZATION/settings/repository-defaults page
  3. For enterprise administrators, on the https://github.com/enterprises/YOUR-ENTERPRISE/settings/member_privileges page

This change is one of many changes GitHub is making to support projects and maintainers that want to rename their default branch. To learn more about the changes we're making, see github/renaming.