<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Git on Cathrine Wilhelmsen</title>
    <link>https://www.cathrinewilhelmsen.net/tags/git/</link>
    <description>Recent content in Git on Cathrine Wilhelmsen</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <copyright>© Cathrine Wilhelmsen</copyright>
    <lastBuildDate>Mon, 21 Sep 2020 15:42:30 +0200</lastBuildDate>
    <atom:link href="https://www.cathrinewilhelmsen.net/tags/git/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Renaming the default branch in Azure Data Factory Git repositories from &#34;master&#34; to &#34;main&#34;</title>
      <link>https://www.cathrinewilhelmsen.net/renaming-default-branch-azure-data-factory-git-repository/</link>
      <pubDate>Mon, 21 Sep 2020 15:42:30 +0200</pubDate>
      <guid>https://www.cathrinewilhelmsen.net/renaming-default-branch-azure-data-factory-git-repository/</guid>
      <description>&lt;p&gt;&#xA;&#xA;&#xA;&#xA;&lt;img src=&#34;https://www.cathrinewilhelmsen.net/images/adf/SourceControlCircle.svg&#34; alt=&#34;Branch icon.&#34; width=&#34;80&#34; height=&#34;80&#34; class=&#34;alignleft width-80&#34; loading=&#34;lazy&#34; /&gt;&lt;/p&gt;&#xA;&lt;p&gt;In Azure Data Factory, you can connect to a Git repository using either GitHub or Azure DevOps. When connecting, you have to specify which &lt;em&gt;collaboration branch&lt;/em&gt; to use. In most cases, the &lt;em&gt;default branch&lt;/em&gt; is used. Historically, the default branch name in git repositories has been &amp;ldquo;&lt;em&gt;master&lt;/em&gt;&amp;rdquo;. This is problematic because it is not inclusive and is very offensive to many people.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;a href=&#34;https://sfconservancy.org/news/2020/jun/23/gitbranchname/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Git project&lt;/a&gt;, &lt;a href=&#34;https://github.com/github/renaming&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;GitHub&lt;/a&gt;, and &lt;a href=&#34;https://devblogs.microsoft.com/devops/azure-repos-default-branch-name/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Azure DevOps&lt;/a&gt; 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 &amp;ldquo;&lt;em&gt;main&lt;/em&gt;&amp;rdquo; in 2020. I fully support this change and will be doing the same in my projects.&lt;/p&gt;&#xA;&lt;p&gt;In this post, we will go through how to rename the default branch from &amp;ldquo;&lt;em&gt;master&lt;/em&gt;&amp;rdquo; to &amp;ldquo;&lt;em&gt;main&lt;/em&gt;&amp;rdquo; 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 &amp;ldquo;&lt;em&gt;main&lt;/em&gt;&amp;rdquo; branch as the collaboration branch.&lt;/p&gt;&#xA;&lt;p&gt;For these examples, I&amp;rsquo;m using my personal demo projects. I&amp;rsquo;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. 😊&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-short-version&#34;&gt;The Short Version&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a new &amp;ldquo;&lt;em&gt;main&lt;/em&gt;&amp;rdquo; branch in your Git repository&lt;/li&gt;&#xA;&lt;li&gt;Set the new &amp;ldquo;&lt;em&gt;main&lt;/em&gt;&amp;rdquo; branch as the default branch in your Git repository&lt;/li&gt;&#xA;&lt;li&gt;Delete the old &amp;ldquo;&lt;em&gt;master&lt;/em&gt;&amp;rdquo; branch in your Git repository&lt;/li&gt;&#xA;&lt;li&gt;Disconnect from your Git repository in Azure Data Factory&lt;/li&gt;&#xA;&lt;li&gt;Reconnect to your Git repository in Azure Data Factory using the new &amp;ldquo;&lt;em&gt;main&lt;/em&gt;&amp;rdquo; branch as the collaboration branch&#xA;&lt;span id=&#34;continue-reading&#34;&gt;&lt;/span&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;</description>
    </item>
  </channel>
</rss>
