git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git branch behavior after git init needs fixing

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 9, 2026, 17:08 UTC
Message-ID
<xmqqjywl6e0w.fsf@gitster.g>
In-Reply-To
<D1CA4E13-B279-4931-81EF-364169564612@gmail.com>
Ben Knoble <ben.knoble@gmail.com> writes:
> You are probably looking for init.defaultBranch and the 3.0
> breaking changes plan (which will make main the default).
In other words, run
    $ git config --global init.defaultbranch main

just once to live in the future? That sounds like a sensible suggestion to me.

Previous: Ben KnobleNext: Junio C Hamano
Message 3 of 4 in “git branch behavior after git init needs fixing”
  1. Ryan JohnsonFeb 9, 2026
  2. Ben KnobleFeb 9, 2026
  3. Junio C HamanoFeb 9, 2026
  4. Junio C HamanoFeb 9, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.