# ITK Git repository primary branch name transition from master to main

**URL:** https://discourse.itk.org/t/itk-git-repository-primary-branch-name-transition-from-master-to-main/7569
**Category:** Community
**Tags:** github, git
**Created:** [June 23, 2025, 7:41pm UTC](https://discourse.itk.org/t/itk-git-repository-primary-branch-name-transition-from-master-to-main/7569 "2025-06-23T19:41:18Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [June 23, 2025, 7:41pm UTC](https://discourse.itk.org/t/itk-git-repository-primary-branch-name-transition-from-master-to-main/7569/1 "2025-06-23T19:41:18Z")

</div>

Hi folks,

**ITK’s default, primary branch name has been renamed from `master` to `main`**.

New GitHub clones will default to this branch.

A few notes on changes that might be required.

## GitHub Forks

When you visit your fork on GitHub, you may encounter:

 ![itk-maste-to-main-fork-notice](https://discourse.itk.org/uploads/default/original/2X/2/22189643d93c30e4971aa0a360aab718eabdc2d7.png)

Click the branch settings link, and click the _pen button icon_ in the repositories _Default branch_ settings:

 ![itk-master-to-main-default-branch](https://discourse.itk.org/uploads/default/original/2X/b/bb234dbf285bd9ce75ecdbe401ef7d30ad419c1b.png)

Then, enter `main`:

 ![itk-master-to-main-fork-rename](https://discourse.itk.org/uploads/default/original/2X/f/f3dd1b2c979dc4dedfb0130dd47b7308ca0cc43b.png)

Most remote module repositories have aleady made this transition – you may want to make similar changes in any remote module forks.

## Local clones

If you have a local clone that was already configured for development with the `./Utilities/SetupForDevelopment.sh` script,

```auto
cd ITK
git checkout master
git pull upstream main
./Utilities/SetupForDevelopment.sh

```

This will prompt to change the `master` branch to `main`. When doing so, it will also update other local Git configurations accordingly.

## Dashboard submissions

If have CDash dashboard submissions, update your dashboard configuration to include:

```auto
set(dashboard_git_branch main)

```

* * *

If you run into other issues, please make a note on this thread.

---

<div class="post-metadata">

### Author: ![Niels\_Dekker](https://discourse.itk.org/letter_avatar_proxy/v4/letter/n/9d8465/32.png) [@Niels\_Dekker](https://discourse.itk.org/u/Niels_Dekker)
#### Post date: [June 26, 2025, 9:02am UTC](https://discourse.itk.org/t/itk-git-repository-primary-branch-name-transition-from-master-to-main/7569/2 "2025-06-26T09:02:45Z")

</div>

Thank you very much @matt.mccormick I like “main” 👍

I’m not sure if it’s related, but I have run into an issue, locally, on Windows (on two computers, actually). When I try to commit, using TortoiseGit, it fails, saying:

```log

Check version of SetupForDevelopment.....................................Passed
local pre-commit.........................................................Passed
kw commit-msg............................................................Failed
- hook id: kw-commit-msg
- exit code: 9009

Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Apps > Advanced app settings > App execution aliases.

```

I did install Python locally by running the installer (“python-3.13.5-amd64.exe”). Any clue?

---

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [June 26, 2025, 1:41pm UTC](https://discourse.itk.org/t/itk-git-repository-primary-branch-name-transition-from-master-to-main/7569/3 "2025-06-26T13:41:03Z")

</div>

@Niels_Dekker that issue is the result of an unrelated recent change that migrates the pre-commit hook from bash to python. Here is a fix:

> <https://github.com/InsightSoftwareConsortium/ITK/pull/5442>
>
> Python may not be available on Windows systems. Use a launcher script to run loc…al Python pre-commit hooks with the Python executable we generate when bootstrapping our pre-commit hooks. The launcher script uses the local Python, which we know will be available and have a sufficient version. It also allows adjusting the path with Windows vs Unix.

---

<div class="post-metadata">

### Author: ![ntustison](https://discourse.itk.org/user_avatar/discourse.itk.org/ntustison/32/462_2.png) [@ntustison](https://discourse.itk.org/u/ntustison)
#### Post date: [June 27, 2025, 10:50pm UTC](https://discourse.itk.org/t/itk-git-repository-primary-branch-name-transition-from-master-to-main/7569/4 "2025-06-27T22:50:35Z")

</div>

> [@matt.mccormick](#):
>
> Most remote module repositories have aleady made this transition – you may want to make similar changes in any remote module forks.

Hey @matt.mccormick , should I make this change to the [adaptive denoising module](https://github.com/ntustison/ITKAdaptiveDenoising)?

---

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [June 30, 2025, 3:15pm UTC](https://discourse.itk.org/t/itk-git-repository-primary-branch-name-transition-from-master-to-main/7569/5 "2025-06-30T15:15:01Z")

</div>

Hey @ntustison , yes that would be great 🙂 👍

---

<div class="post-metadata">

### Author: ![simon.rit](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/f08c70/32.png) [@simon.rit](https://discourse.itk.org/u/simon.rit)
#### Post date: [July 4, 2025, 9:27am UTC](https://discourse.itk.org/t/itk-git-repository-primary-branch-name-transition-from-master-to-main/7569/6 "2025-07-04T09:27:06Z")

</div>

After renaming, one needs to update local clones. I have added a note in RTK’s documentation about this (after renaming [RTK](https://github.com/RTKConsortium/RTK), [CudaCommon](https://github.com/RTKConsortium/ITKCudaCommon) and [PCT](https://github.com/RTKConsortium/PCT)):

> **[RTK v3 migration guide - RTK's documentation](https://docs.openrtk.org/en/latest/documentation/docs/rtk_3_migration_guide.html#default-branch-renamed-from-master-to-main)**
