Skip to content

CRA creates an app with the "master" branch as the main branch. #12414

@ThePiyushAggarwal

Description

@ThePiyushAggarwal

Github is prefers all the with "main" branch name. Please change this as it creates many problems if we forget to change in a new project

Activity

krreet

krreet commented on May 20, 2022

@krreet
Contributor

Github is prefers all the with "main" branch name. Please change this as it creates many problems if we forget to change in a new project

You might want to make the same change to your own Git installation. It's quite simple. Just a matter of issuing the following Git command:

git config --global init.defaultBranch main.

or you may want to select it during setup

image

FYI There is nothing is the create-react-app to select master branch as the default.

ThePiyushAggarwal

ThePiyushAggarwal commented on May 21, 2022

@ThePiyushAggarwal
Author

It worked. Thank you!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ThePiyushAggarwal@krreet

        Issue actions

          CRA creates an app with the "master" branch as the main branch. · Issue #12414 · facebook/create-react-app