You will see a warning that you should publish all pending changes before disconnecting to avoid losing any changes. Go to the Manage page and click on Git Configuration. If you get a notification that the current working branch was deleted, use the new “ main” branch instead: Open or switch back to your Azure Data Factory. Yay! The default branch has now been changed to “ main”:īack in the branches overview, click on the delete icon next to the “ master” branch to delete it: The warning says that changing your default branch can have unintended consequences that can affect new pull requests and clones. On the default branch page, click on the branch dropdown where it says “ master”. In the branches overview, click on Change default branch: Type “ main” as the new branch name, then click on Create branch: main from master: ![]() On the Code page, click on the branch dropdown where it says “ master”. Open your Azure Data Factory Git repository in GitHub. (If you are using Azure DevOps instead, scroll down □□□) Reconnect to your Git repository in Azure Data Factory using the new “ main” branch as the collaboration branchįor The Longer Version with Screenshots, scroll down to GitHub or Azure DevOps □□ GitHub.Disconnect from your Git repository in Azure Data Factory.Delete the old “ master” branch in your Git repository.Set the new “ main” branch as the default branch in your Git repository.Create a new “ main” branch in your Git repository.As always, keep in mind that this is most likely a larger change, both technically and organizationally, in production and enterprise projects. I’m not taking into consideration any branch policies, other users, third-party tools, or external dependencies. Then we will reconnect Azure Data Factory and configure it to use the new “ main” branch as the collaboration branch.įor these examples, I’m using my personal demo projects. In this post, we will go through how to rename the default branch from “ master” to “ main” in Azure Data Factory Git repositories hosted in GitHub and Azure DevOps. I fully support this change and will be doing the same in my projects. ![]() GitHub and Azure DevOps will be changing their default branch names to “ main” in 2020. The Git project, GitHub, and Azure DevOps are making changes to allow users to specify a different default branch name. This is problematic because it is not inclusive and is very offensive to many people. Historically, the default branch name in git repositories has been “ master”. In most cases, the default branch is used. When connecting, you have to specify which collaboration branch to use. ![]() Either one of those steps individually does set up a redirect ( ) but I’m worried that two levels of redirection might break something.Īnyone have experience with doing something like this? Any suggestions for other approaches? (One thing I thought of would be to do the transfer + rename, then fork the renamed repository back to a new opensolid/geometry repository so anything URL-based should still work.In Azure Data Factory, you can connect to a Git repository using either GitHub or Azure DevOps. What happens with a transfer + rename? It doesn’t look like I can do it in one step, I’ll have to transfer opensolid/geometry to ianmackenzie/geometry and then rename that to ianmackenzie/elm-geometry.Does elm-package do anything weird that might circumvent or not respect GitHub’s redirects?.Ideally, I would do this by transferring the repository to my own user account and then renaming it so that I retain issues, pull requests etc., but I want to make sure that I don’t break package downloading for anyone using the existing package! GitHub does apparently forward all requests from the old repository to the new ( ) but I’m worried about a couple things: In the spirit of literal package names, I’m planning to rename my opensolid/geometry package to ianmackenzie/elm-geometry.
0 Comments
Leave a Reply. |