question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

By default master branch is created, but now github uses main branch as default branch

See original GitHub issue

Describe the bug

create-react-app sets master as the default branch but Github has now changed the default branch to be main. So now this package should create the branch name same as that of Github to keep consistency. (Write your answer here.)

Did you try recovering your dependencies?

Not needed

6.14.8 (Write your answer here.)

Which terms did you search for in User Guide?

(Write your answer here if relevant.)

Environment

System: OS: Linux 5.8 Manjaro Linux CPU: (8) x64 Intel® Core™ i7-7700HQ CPU @ 2.80GHz Binaries: Node: 14.8.0 - ~/.nvm/versions/node/v14.8.0/bin/node Yarn: 1.22.5 - /usr/bin/yarn npm: 6.14.8 - ~/.nvm/versions/node/v14.8.0/bin/npm Browsers: Chrome: Not Found Firefox: Not Found npmPackages: react: ^16.13.1 => 16.13.1 react-dom: ^16.13.1 => 16.13.1 react-scripts: 3.4.3 => 3.4.3 npmGlobalPackages: create-react-app: 3.4.1

(paste the output of the command here.)

Steps to reproduce

(Write your steps here:)

  1. run npx create-react-app test
  2. see the branch name

Expected behavior

Default branch name should be main (Write what you thought would happen.)

Actual behavior

Defatul branch name is master

(Write what happened. Please add screenshots!)

Reproducible demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
giovannibenussicommented, Oct 6, 2020

I don’t think that Github’s decisions should set this library’s decisions. However, I agree that there’s a need to update the default branch name to main or at least be able to specify it with a flag.

BTW, If it’s considered a first good issue, I want to take it 😅

1reaction
tsongascommented, Apr 21, 2021

Opinions on whether defaulting to “master” is a violation of Facebook’s hate speech policy? Specifically “violent or dehumanizing speech, harmful stereotypes, statements of inferiority, expressions of contempt, disgust or dismissal, cursing, and calls for exclusion or segregation.”

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changing the default branch - GitHub Docs
Changing the default branch · On GitHub.com, navigate to the main page of the repository. · Under your repository name, click Settings. ·...
Read more >
Why GitHub renamed its master branch to main | TheServerSide
Since its inception, the Git DVCS tool's default branch name was set to master. Every Git repository had a master branch unless a...
Read more >
Renaming the default branch - Tidyverse
The way most repos end up with master as their default branch is that Git itself defaults to master when it creates the...
Read more >
5 steps to change GitHub default branch from master to main
Step 1 - Move the master branch to 'main' · Step 2 - Push 'main' to remote repo · Step 3 - Point...
Read more >
github default branch is main but not master - Stack Overflow
You can pick whatever default branch you like: docs.github.com/en/free-pro-team@latest/github/… – jonrsharpe · Thanks. · FYI: The change from ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found