Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default branch name to main #76

Open
movermeyer opened this issue Nov 15, 2022 · 0 comments
Open

Change default branch name to main #76

movermeyer opened this issue Nov 15, 2022 · 0 comments

Comments

@movermeyer
Copy link

movermeyer commented Nov 15, 2022

The Git ecosystem is moving away from the default branch name of master, towards the name main.

e.g. All new repos on GitHub/GitLab/Bitbucket now use main as the default branch name for new repositories.

Change the default branch of iain/http_accept_language to use main.

How is this done?

  1. Rename the default branch in the GitHub UI (Requires Administrator rights on the repo)
  2. Use git grep master and update mentions of the outdated branch name in documentation and URLs.

Developers with local clones will have to perform a one-time update of the local clones by running:

git branch -m master main
git fetch origin
git branch -u origin/main main
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main

These commands are also shown to developers who visit the repo in the GitHub interface, so it doesn't require additional advertising work from our end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant