-
Notifications
You must be signed in to change notification settings - Fork 20
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
Repo management: switch default branch to main? #113
Comments
I'm game! |
Feel free to post the commands, although I tend to just re-fork when I run into this problem 🙂 |
That's a good alternative too, people are free to choose! |
To avoid misunderstanding: the 'git commands' are applicable after the default branch in GitHub has switched. So I'll wait a little. |
Posting the git commands already – applicable only after Dewey has flipped the default branch to Below is just one of several possible approaches to do it with git, just renaming the For direct contributors to this repogit fetch --prune
git checkout master
git branch -m main
git branch -u origin/main # supposing origin is the name in use
git pull # makes main up to date with remote For contributors using a forkEasiest is to just make a new fork, but alternatively I expect it to work with below commands. The commands suppose that the fork is referred as $ git remote -v
origin [email protected]:<username>/qgisprocess.git (fetch)
origin [email protected]:<username>/qgisprocess.git (push)
upstream [email protected]:paleolimbot/qgisprocess.git (fetch)
upstream [email protected]:paleolimbot/qgisprocess.git (push) Do:
Next switch GitHub's default branch in your existing fork and then:
|
@paleolimbot since I don't have access to this setting, can you switch the default branch in GitHub? See steps in https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/changing-the-default-branch. |
I'll probably do it this way: https://www.tidyverse.org/blog/2021/10/renaming-default-branch/#how-to-rename-default-branch-in-your-own-existing-repos (but you're right, it probably has to be me!) |
👍 that probably uses the GH api to do the same. But of course permission policy will always rule. |
After reading the docs of these functions, I expect they can't do exactly what is best here; i.e. designating the already prepared |
Could you delete the existing main branch then? |
OK, done (actually: renamed it to |
Hi @paleolimbot, would you agree we best migrate to
main
as new default branch?I pushed
main
and propose one extra commit there, in order to adjust the repo's contents:OBSOLETE See diff between master and main: https://github.com/paleolimbot/qgisprocess/compare/master..main.
If that's OK, then all that's needed is that you switch the default branch in the repo settings. After that,
master
can bepush --delete
d.I can post a few git commands here to help contributors follow the migration locally.
The text was updated successfully, but these errors were encountered: