Renaming "master" branch into "main"

Hello everyone,

As you all know, Git conventions have changed since its inception, and it is now recommended to name the main branch “main” rather than “master.”

Orekit and Hipparchus have already made the switch. We would like to do the same for Rugged, to ensure consistency across projects.

I will therefore rename the “master” branch of the Rugged repository to “main” this afternoon and will then let you know what steps to take to bring your local clone into compliance.

3 Likes

This makes sense, thank you @sdinot :+1:

The renaming has been completed. The documentation and website have been updated. To reflect this change in your clone of the official repository, you must run the following commands:

cd /path/to/rugged/repo
git branch -m master main
git push --set-upstream main
1 Like

Great !! Thanks @sdinot

To avoid any confusion, if you are working on your own fork of Rugged, I invite you to clean up your repository on GitLab:

1. Log in to GitLab and go to the administration section of your fork repository (Fork landing page → Settings → Repository)

2. Change the default branch (mastermain)

3. If you have defined one, delete the branch rule for the master branch and create an identical branch rule for the main branch.

4. If the master branch is protected, remove this protection and apply it to the main branch.

Once this is done, you can delete the existing master branch on GitLab from your clone on your workstation:

cd /path/to/rugged/repo
git push origin --delete master