Will Smythe b450893002 Merge pull request #16 from TheJaredWilcurt/patch-1 | 2 лет назад | |
---|---|---|
CODE_OF_CONDUCT.md | 4 лет назад | |
CONTRIBUTING.md | 4 лет назад | |
LICENSE | 4 лет назад | |
README.md | 2 лет назад | |
local-config-prompt.png | 4 лет назад | |
rename-default-branch-dialog.png | 4 лет назад |
master
Many communities, both on GitHub and in the wider Git community, are considering renaming the default branch name of their repository from master
. GitHub is gradually renaming the default branch of our own repositories from master
to main
. We're committed to making the renaming process as seamless as possible for project maintainers and all of their contributors. This repository is our up-to-date guidance on how and when to rename your default branch.
We're not the only organization in the Git ecosystem making these changes: there are upcoming changes in the Git project (statement, code change), as well as coordinated changes from multiple vendors.
We're making changes to GitHub in a few phases, designed to cause as little disruption to existing projects as possible.
master
to the corresponding link in the repository's new default branch.gh-pages
branch will still work the same as it always has, but now you can choose any other branch in your repository as the publishing source.git init
on the command line. Learn more about the new init.defaultBranch
setting in the Git 2.28 blog post.main
as the default branch nameThe default branch name for new repositories created on GitHub is now main
. To set a different default:
https://github.com/organizations/YOUR-ORGANIZATION/settings/repository-defaults
pagehttps://github.com/enterprises/YOUR-ENTERPRISE/settings/member_privileges
pageUsers, organizations, and enterprises that previously selected a default branch for new repositories are not impacted by this change. Existing repositories are also not impacted by this change.
main
is the most popular replacement for master
that we're seeing across GitHub. We like it because it's short, it keeps your muscle memory intact, and it translates well across most languages. We're using main
for our newly-created repositories and for the repositories we're moving now, like dependabot-core.
You can now rename any branch, including the default branch, from the web.
Renaming a branch will:
git push
to the old branchLearn more about renaming a branch.