FelixBaensch / MORTAR

MOlecule fRagmenTAtion fRamework
MIT License
18 stars 3 forks source link

Rename master branch to main #29

Closed JonasSchaub closed 7 months ago

FelixBaensch commented 7 months ago

Does this affect the existing PRs?

At the same time, the repository could be tidied up, old branches deleted, etc.

JonasSchaub commented 7 months ago

Does this affect the existing PRs?

If you rename the branch here in the remote (Settings -> Default Branch -> Rename Branch), it should not affect PRs, since it is still the same branch. But PRs can also be later configured to point to another branch. The only slight issue is that you/we have to also rename the branch in our local clones or simply check out the new main branch.

At the same time, the repository could be tidied up, old branches deleted, etc.

Always a good idea.

FelixBaensch commented 7 months ago

If you rename the branch here in the remote Done

To change it locally follow:

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

Please mark or delete old, unnecessary branches

JonasSchaub commented 7 months ago

"git branch -u origin/" produced "error: the requested upstream branch 'origin/' does not exist" but the local renaming was still successful as it seems, thanks!

JonasSchaub commented 7 months ago

GitHub told me to use this:

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

JonasSchaub commented 7 months ago

Please mark or delete old, unnecessary branches

I've looked through the branches and deleted those that were merged and not used afterwards.