Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What about replacing "master" branch by "main" branch ? #8620

Open
srbarrios opened this issue Apr 19, 2024 · 4 comments
Open

What about replacing "master" branch by "main" branch ? #8620

srbarrios opened this issue Apr 19, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@srbarrios
Copy link
Member

srbarrios commented Apr 19, 2024

Short description

The term master is out of favor in the computing world and beyond. Let's use the new standard and replace our trunk from "master" branch to "main" branch.

Details

The computer industry's use of the terms master and slave caught everyone's attention in the summer of 2020. Amid the many protests and the growing social unrest, these harmful and antiquated terms were no longer considered appropriate.

Link: https://sfconservancy.org/news/2020/jun/23/gitbranchname/

"Both Conservancy and the Git project are aware that the initial branch name, 'master,' is offensive to some people and we empathize with those hurt by the use of that term," said the Software Freedom Conservancy.

Steps

Git commands:

# Connect local repo with your remote repo
git remote add origin <remote_github_url>

# Pull the main source code
git pull origin main

# Move the source from master to main branch
git branch -m master main

# Add and commit your changes
git add .
git commit -m "master branch changed to main"

# Set upstream and push changes to remote
git push --set-upstream origin main

GitHub configuration:

  • Change Default branch in project's settings
@srbarrios srbarrios added the enhancement New feature or request label Apr 19, 2024
@srbarrios srbarrios changed the title Replace "master" branch by "main" branch What about replacing "master" branch by "main" branch ? Apr 19, 2024
@szachovy
Copy link
Contributor

I think that changing Default branch in project's settings would also be mandatory as a step.

@szachovy
Copy link
Contributor

szachovy commented Apr 19, 2024

Not sure how our branch protection settings are configured, maybe some settings also need to be changed manually with other settings concerned.

@rjmateus
Copy link
Member

there one missing pice, that is verify our workflow that can have the branch hardcoded

@mbussolotto
Copy link
Member

also translation procedure would require some adjustment (e.g. branch name is master-weblate )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants