📢 GitHub to replace 'master' branch with 'main' on 1st October

Microsoft owned GitHub made an announcement that the company is going to rename the default 'master' branch to 'main', starting 1st October 2020. - Story published by Kunal Chowdhury on , and was last updated on 2020-09-22T03:39:47Z.
Follow us on:    Twitter  |  Mastodon  |  Facebook  |  WhatsApp  |  Telegram  |  Google News

Starting 1st October, GitHub to replace the default 'master' branch with 'main'. GitHub said that they are committed to making the renaming process as seamless as possible for project maintainers, and thus they are coming up with a tool later this year.


So, what will be the impact next month to your new and existing repositories hosted on GitHub? To know the answer, you will need to read the post further.


Say 'Goodbye' to the default 'master' branch of GitHub


Just like any other Git repositories, GitHub also uses the term 'master' as its default branch when you create a new repository on the platform. Now, the Microsoft owned GitHub is dropping the default 'master' branch name, and replacing it with 'main'.


Recently the company officially released GitHub CLI version 1.0, a new command-line interface that will allow you to run your entire workflow from the terminal.


Starting next month, when you create a new repository on GitHub, it will create 'main' as the default branch. For the existing repositories, there won't be any changes at this moment, but GitHub will start redirecting all calls to the new branch name by end of this year.


Git 2.28 added a setting to control the default branch used when you run git init on the command line. If you are creating any new repositories before 1 st October, consider using this command to rename your default branch.


If you didn't rename your default branch yet, GitHub asks users to consider waiting until next year. "If you haven't renamed your default branch yet, consider waiting until later this year", said GitHub, "We're investing in tools to make renaming the default branch of an existing repository a seamless experience for both maintainers and contributors".