blog · git · desktop · images · contact


Heads up: mastermain in my Git repos on 2022-06-01

2021-10-24

At the end of last year, I changed all my Git repos. The main branch is now called main. I kept a master branch around, which pointed to the same revision as main for compatibility reasons.

On 2022-06-01, these master branches will be removed. From then on, only main will work.

If you have cloned a repo of mine and want to switch to the new branch, either clone the repo afresh or run the following steps:

$ git checkout master
$ git branch -m main
$ git fetch
$ git branch -u origin/main
$ git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main

It’s very easy for my Git tooling to keep master around, hence the very long grace period of 1.5 years. Still, at some point, it should go.

Comments?