-
Notifications
You must be signed in to change notification settings - Fork 41
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
Switch default git branch to main #679
Comments
I did locally
Then renamed the default branch to main in GitHub UI, and I was shown the commands to update local clones:
|
References to master updated in #680. In Wiki the master -> main redirection in links works, so there is no need updates in there. So everything else should be working as previously, but CodeBeat analysis got confused: the checks show and I cannot find a way to change the target branch in CodeBeat project/account, I think I don't have the permissions for that. |
I had to recreate the NatLibFi/Annif project in Codebeat and delete the old one, as it wasn't possible to change the branch directly. I changed the badge in 3d44c00 so it refers to the new project. |
Osma changed the branch also for the Scrutinizer analysis, so now (again) everything for this seems to be done, I close this. |
Still one update was needed: the "latest" version of ReadTheDocs documetation was no following the new main branch before I switched the default branch (in Advanced Setttings) from |
Nowdays the default branch of a new GitHub repository is named main instead of master, and many existing projects have renamed the default branch to main.
According to GitHub documentation the basic rename process should be quite straightforward. When a branch (master) is renamed in the GitHub web UI, automation re-targets all open PRs, sets up URL redirects etc..
However, the default branch can also be changed to an existing branch. This gives the opportunity to cleanly get rid of the two erroneously pushed commits (this and this) to master and their reverts by first branching the main from master at the point before the erroneous commits. Apparently changing the default branch does not automatically retarget PRs and do other changes what renaming would do.
But as @osma suggested, lets do the rename, and just drop the erroneous commits before.
Steps:
main
The text was updated successfully, but these errors were encountered: