💾 Archived View for darknesscode.xyz › notes › move-master-branch-to-main.gmi captured on 2024-07-09 at 00:27:54. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-12-17)
-=-=-=-=-=-=-
This steps works for Github, Gitlab and your own git server.
git branch -m master main
git push -u origin main
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main
Follow the instructions in your git provider to change the defual master
git push origin --delete master
git branch -a
You should have an output like
That's it... you chanched the master branch to main
----------
----------
© DarknessCode - LinuxSucks