nextcloud / groupware

Meta repo for the groupware team
7 stars 0 forks source link

Rename main repo branches #3

Closed ChristophWurst closed 2 years ago

ChristophWurst commented 2 years ago

Our repos still use master for the main branch and we should finally switch to main. Github and other tools should work without any issues by now.

Possible pain points to check

Workflow

Follow the instructons on https://github.com/github/renaming/ to get all the nice benefits of auto renaming for open PRs etc.

Then look through all workflows for mentions of the master branch for this repository and rename them to main.

You can update your local branches by running:

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

Repos

Ref https://github.blog/changelog/2020-10-01-the-default-branch-for-newly-created-repositories-is-now-main/ Ref https://github.com/github/renaming/

miaulalala commented 2 years ago

I did the Calendar Resource Management repo in the way github suggests here: https://github.com/github/renaming/ and it worked well. I would recommend doing this the github way to get all those nice benefits of automatically alerting users to the change and so on.

st3iny commented 2 years ago

I did the Calendar Resource Management repo in the way github suggests here: https://github.com/github/renaming/ and it worked well. I would recommend doing this the github way to get all those nice benefits of automatically alerting users to the change and so on.

I agree. That also updates the base branch of all open pull requests automatically.

ChristophWurst commented 2 years ago

Preliminary todo

@miaulalala please update this with the steps we now do for every repo.

As the renaming of the resources repo didn't create any trouble so far I would say we migrate all other repos as soon as possible.

miaulalala commented 2 years ago

Workflow:

Follow the instructons on https://github.com/github/renaming/ to get all the nice benefits of auto renaming for open PRs etc.

Then look through all workflows for mentions of the master branch for this repository and rename them to main.

You can update your local branches by running:

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
miaulalala commented 2 years ago

All done