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

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

Closed
ThePiyushAggarwal opened this issue May 19, 2022 · 2 comments
Closed

Comments

@ThePiyushAggarwal
Copy link

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

@krreet
Copy link
Contributor

krreet commented May 20, 2022

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
Copy link
Author

It worked. Thank you!

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

No branches or pull requests

2 participants