frameworks icon indicating copy to clipboard operation
frameworks copied to clipboard

Rename "master" branch to "main" branch

Open MartinPetkov opened this issue 4 years ago • 0 comments

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.

MartinPetkov avatar Nov 12 '20 20:11 MartinPetkov