Renaming git 'master' branch


as many people might have heard, the Git team is making progress on renaming its default branch from ‘master’ to (probably) ‘main’. We have no concrete plans on migrating our own repositories yet, as there is quite some work involved. Affected systems are: server repositories, client repositories, buildserver, tools, skripts, documentation, etc. The effort needs to be multiplied by the number of repositories and team members as well. Not to mention communicating this to the team.

One part of it is ContinuaCI. Repositories must be updated as well as changes to all existing configurations. Can this be made more easy by directly updating the database? Do you have any plans to support a migration feature?

Hi Thomas,

The next version will use “main” as the initial default branch for new Git repositories.

We don’t currently have plans to add a feature to migrate branches of existing repositories. We’re not sure how much demand there would be for this as we would normally expect people to update one repository at a time, after updating the underlying repository.

I guess your main issue is updating branch references in variables, actions etc. An automatic text search and replace on branch name is fraught with dangers as the word may be used legitimately in other places. We can however help you to work out the database scripts required.