TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Has GitHub reverted its default branch nomenclature back to “master”?

1 点作者 eclat超过 3 年前
I just realised when creating a new repo that the default prompt mentions master instead of main. Good on them, I&#x27;m glad common sense prevailed on this non-issue. Is this the case everywhere?<p>Current new repo text:<p>..or create a new repository on the command line<p>echo &quot;# repo&quot; &gt;&gt; README.md<p>git init<p>git add README.md<p>git commit -m &quot;first commit&quot;<p>git branch -M master<p>git remote add origin https:&#x2F;&#x2F;github.com&#x2F;your&#x2F;repo.git<p>git push -u origin master

1 comment

bloak超过 3 年前
You can set your own default for new repositories: (circular picture in top right corner) -&gt; Settings -&gt; (about half way down on the left) Repositories -&gt; (top of page) Repository default branch<p>I don&#x27;t know whether changing that changes the &quot;new repo text&quot; but since the text for &quot;Repository default branch&quot; says &quot;You might want to change the default name due to different workflows, or because your integrations still require “master” as the default branch name.&quot; I would guess the default default is &quot;main&quot;, so either you have set your default to &quot;master&quot;, or the new repo text is out-of-date, I would guess.