Skip to content

Instantly share code, notes, and snippets.

View arichar6's full-sized avatar

Steve Richardson arichar6

  • Zap Energy
View GitHub Profile
@arichar6
arichar6 / gist:357c0254c7d84603ce7256f2a74f8a22
Last active July 10, 2020 16:07
These commands should let you rename the default branch in a git repo
# On your local clone, make sure that your code is up to date with the remote (called `origin`)
git pull origin master
# Then rename your local `master` branch to `main`
git branch -m master main
# Then push your `main` branch back to `origin`, using a command that will make a new branch called `main` on the remote.
git push origin HEAD
# After this, you can: