public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* git branch behavior after git init needs fixing
@ 2026-02-09  9:43 Ryan Johnson
  2026-02-09 14:54 ` Ben Knoble
  0 siblings, 1 reply; 4+ messages in thread
From: Ryan Johnson @ 2026-02-09  9:43 UTC (permalink / raw)
  To: git@vger.kernel.org

Immediately after running `git init`, Git's `git branch` output is empty.

This is problematic because this implies that there is no default branch. I am told that there is a subtle distinction between an already-created branch and a "promise" to create a branch upon git init. The "promise" of a branch is not exposed, when it should be in the `git branch`command.

Hiding the default branch name from git branch is inconsistent with the information reported by other commands like `git status` and clashes with the availability of branch operations. `git status` reports that the repository is "On branch master". A typical user will need to rename their branch from master to main to conform with modern standards, so having no branch shown is confusing and quite frankly wrong. In the interest of fixing stupid UX design, make `git branch`produce the expected output, regardless of the literal internal workings of git.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-09 22:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-09  9:43 git branch behavior after git init needs fixing Ryan Johnson
2026-02-09 14:54 ` Ben Knoble
2026-02-09 17:08   ` Junio C Hamano
2026-02-09 22:38     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox