Recently, there are many suggestions about renaming the default branch master to some other name. This was mainly due to the master-slave metaphor.
最近,有许多关于将默认分支主机重命名为其他名称的建议。 这主要是由于主从比喻。
There is evidence that states it was intended to mention master-copy or master recording. And it is not intended to be master-slave.
有证据表明它打算提及原件或原件录音。 并且它不打算成为主从。
But I think it’s people’s perspective, and they should be empowered to make this change.
但是我认为这是人们的观点,应该授权他们进行此更改。
So let’s see how to change the default git branch master to default (you can use your preferred name)
因此,让我们来看看如何将默认的git branch master更改为default (可以使用您的首选名称)
Before starting I have to tell you that I have tried this in multiple repos and it’s working fine without any breaking changes. If you are not confident enough then fork your repo and try it first.
在开始之前,我必须告诉您我已经在多个存储库中尝试了此操作,并且在没有任何重大更改的情况下工作正常。 如果您没有足够的信心,请先分叉您的仓库,然后再尝试。
先决条件 (Prerequisites)
- Make sure your CI/CD flow doesn’t get interrupted. 确保您的CI / CD流不会中断。
Make sure you have merged all the PRs targeting master. Other PRs are fine
确保您已合并所有PR定位母版。 其他公关很好