Junio Hamano has announced the availability of Git v2.28. Among the highlights of this release is a change relating to ongoing efforts to remove or avoid offensive and exclusionary language, such as the terms “master” and “slave”:
The name of the primary branch in existing repositories, and the default name used for the first branch in newly created repositories, is made configurable, so that we can eventually wean ourselves off of the hardcoded 'master'.
The GitHub blog explains further, saying, “When you initialize a new Git repository from scratch with git init
, Git has always created an initial first branch with the name master
. In Git 2.28, a new configuration option, init.defaultBranch
is being introduced to replace the hard-coded term.”
The configuration variable can be set by the user and only affects new repositories. The change is part of a broader GitHub effort to gradually rename the default branch of all repositories from master
to main
and to make the process “as seamless as possible for project maintainers and all of their contributors.”
More information about the init.defaultBranch
as well as other new features in Git 2.28 are available on the GitHub blog.
Comments