I am on
  • GitHub
  • Twitter
  • Instagram
mazgi.log
  • show translations
    日本語 Gitのデフォルトブランチを"master"から"main"に変える方法
  • Created At: 2020.10.30
  • Updated At: 2023.04.17
share this page via
  • b!

How to Change Git Default Branch to "main" from "master"

tl;dr

  1. git branch --move master main
  2. git remote set-head origin --auto

https://github.com/mazgi-sandbox/202010.change-git-default-branch


TableOfContents


Categories

  • tips

Tags

git github

© mazgi.log  ·  Powered by Hugo  ·  This website uses Google Analytics.