TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Is the official Git default master or main?

1 pointsby chagaifover 3 years ago

3 comments

boleary-glover 3 years ago
The documentation says master: <a href="https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git-init#Documentation&#x2F;git-init.txt---initial-branchltbranch-namegt" rel="nofollow">https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git-init#Documentation&#x2F;git-init.txt...</a> but &quot;may be subject to change&quot;<p>When running &quot;git init&quot; on a fresh install, you also get a hint that the branch name may change. So I think they are still working on changing it to main upstream: <a href="https:&#x2F;&#x2F;lore.kernel.org&#x2F;git&#x2F;pull.762.git.1605221038.gitgitgadget@gmail.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;lore.kernel.org&#x2F;git&#x2F;pull.762.git.1605221038.gitgitga...</a>
nirvaltover 3 years ago
Not sure why it matters... Run &quot;git config --global init.defaultBranch [whatever_name_you_want]&quot; and then &quot;git init&quot;. The reason why &quot;main&quot; is used is to be more politically correct, so it is up to you.
chagaifover 3 years ago
I&#x27;m not asking what GitHub or GitLab do but what the git tool itself has as a default...
评论 #28538744 未加载