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

Rename "master" branch to "main" branch #103

Open
MartinPetkov opened this issue Nov 12, 2020 · 0 comments
Open

Rename "master" branch to "main" branch #103

MartinPetkov opened this issue Nov 12, 2020 · 0 comments

Comments

@MartinPetkov
Copy link

Context: https://github.com/github/renaming

I haven't tried this myself, but these are the supposed steps to do this:

# Move the master branch to main.
$ git branch -m master main

# Push the new "main" branch to GitHub.
$ git push -u origin main

# Point HEAD to main.
$ git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main

# Log in to GitHub , open the repository, and click Settings > Branches.
# Select "main" as your default from the drop-down.
# Click "Update" and when prompted, click "I Understand".

# Delete the "master" branch.
$ git push origin --delete master

PS There may be more things to change that I'm not aware of, such as build/release scripts.

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

No branches or pull requests

1 participant