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

Replaced "main" by "master" #408

Open
wants to merge 1 commit into
base: main
from
Open

Replaced "main" by "master" #408

wants to merge 1 commit into from

Conversation

@tvachkov
Copy link

@tvachkov tvachkov commented Oct 11, 2020

The default branch is normally called master, not main.

With "main" there is an error:
error: src refspec main does not match any

Why:

What's being changed:

Check off the following:

The default branch is normally called master, not main.
@welcome
Copy link

@welcome welcome bot commented Oct 11, 2020

Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@FloorD
Copy link

@FloorD FloorD commented Oct 11, 2020

@tvachkov the change to main is a deliberate one: https://github.com/github/renaming, and https://www.bbc.com/news/technology-53050955 👍

@mitsuhiko
Copy link

@mitsuhiko mitsuhiko commented Oct 11, 2020

It would be better to name the branch explicitly on init considering the default branch name can be reconfigured.

I agree the current guide appears broken.

@tvachkov
Copy link
Author

@tvachkov tvachkov commented Oct 11, 2020

I agree on that - main is deliberated. But since the guide advices to call git init with no parameter for --initial-branch=<branch-name> resp. -b <branch-name>' this falls back to the default name: master.

Then one gets the error: src refspec main does not match any.

@mitsuhiko
Copy link

@mitsuhiko mitsuhiko commented Oct 11, 2020

@tvachkov i think the right fix would be to change the init call to git init -b main. Github itself is changing the default branch name to main at the moment and git is making the default branch name reconfigurable. Considering that can cause confusion and a bad user experience, i think it's better to be explicit here on branch creation.

Also it's pretty evident that main is the preferred branch name now.

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

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.