Git 2.28 brings `init.defaultBranch` ↦
Leading off the updates for Git 2.28 is the highly sought after ability to configure
init.defaultBranch so folks can move from
main as their default branch name.
From Taylor Blau on the GitHub blog:
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.defaultBranchis being introduced to replace the hard-coded term. (For more background on this change, this statement from the Software Freedom Conservancy is an excellent place to look).
Starting in Git 2.28,
git initwill instead look to the value of
init.defaultBranchwhen creating the first branch in a new repository. If that value is unset,
Also check out github/renaming to learn more about the complementary changes GitHub is making. GitLab and Bitbucket are making similar changes.
Sign in or Join to comment or subscribe