Skip to content

Tag: Git

Renaming the default branch in Azure Data Factory Git repositories from “master” to “main”

In Azure Data Factory, you can connect to a Git repository using either GitHub or Azure DevOps. When connecting, you have to specify which collaboration branch to use. In most cases, the default branch is used. Historically, the default branch name in git repositories has been “master“. This is problematic because it is not inclusive and is very offensive to many people.

The Git project, GitHub, and Azure DevOps are making changes to allow users to specify a different default branch name. GitHub and Azure DevOps will be changing their default branch names to “main” in 2020. I fully support this change and will be doing the same in my 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. Then we will reconnect Azure Data Factory and configure it to use the new “main” branch as the collaboration branch.

For these examples, I’m using my personal demo projects. I’m not taking into consideration any branch policies, other users, third-party tools, or external dependencies. As always, keep in mind that this is most likely a larger change, both technically and organizationally, in production and enterprise projects. 😊

The Short Version

  1. Create a new “main” branch in your Git repository
  2. Set the new “main” branch as the default branch in your Git repository
  3. Delete the old “master” branch in your Git repository
  4. Disconnect from your Git repository in Azure Data Factory
  5. Reconnect to your Git repository in Azure Data Factory using the new “main” branch as the collaboration branch
Continue reading →

Free Personal Source Control with Visual Studio and Git

Free Personal Source Control with Visual Studio and GitDo you work on projects in Visual Studio? Are you looking for a free and simple way to source control your projects without sharing them with the whole world? Would you like to be able to manage your projects online and still be able to work on your projects offline? If so, you may want to look into using Visual Studio and Git.

As a speaker and blogger, I create projects for demos, videos and screenshots. When I only had a few projects it worked quite well to “source control” my projects: I kept them in a OneDrive folder, created copies of demo code for new presentations and maintained versions manually.

However, the projects grew in number and size and became more difficult to maintain. There were no easy ways to track how I changed and improved my code over time, and I couldn’t revert to previous code. I kept telling everyone else to use source control, so I decided it was finally time to source control my personal projects.

In this post I will show you how I added my first project to source control with Visual Studio and Git.

Continue reading →