How to Change Git Default Branch to "main" from "master" Created At: 2020.10.30 Updated At: 2023.04.17 tl;dr git branch --move master main git remote set-head origin --auto https://github.com/mazgi-sandbox/202010.change-git-default-branch git github