-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Outdated information
Migrating the branch name is way easier now, GitHub does most of the work, and anybody holding old links will get redirected to the proper branch automatically.
Consider the information listed on this issue badly outdated. Use at your own risk.
GitHub will automate parts of the migration later this year:
Moving to the main
branch as the default branch will be made easier for existing repositories, later this year: https://github.com/github/renaming#later-this-year-seamless-move-for-existing-repositories-
The changes made by GitHub will fix the following issues that moving on our own now would create:
- Open pull requests need to be re-targeted to the new branch
- Draft releases need to be re-targeted to the new branch
- Warning users who fetch/clone from our repository to use the new branch name, and help with migration by creating documentation.
So I would strongly suggest, that we wait until GitHub has fixed those issues, this will help with the load on the maintainers of this project, and increase the likelihood of a successful move.
We still need to manually fix certain things, whether we move manually now, or let GitHub automate parts of the process later.
Preparation:
- Check with the translation projects if they are up for this move.
- I've asked the Git-SCM project how this change would impact them at Impact on the git-scm site if ProGit2 English book changes default branch from
master
tomain
? git/git-scm.com#1501. They've merged preferHEAD
tomaster
in update tasks git/git-scm.com#1502 so they useHEAD
instead ofmaster
for their update tasks. It should just work now. - Check the moving over checklist, figure out if more is needed?
- Go/no go decision.
- Decide on a "move over" date, and communicate it to the community via a pinned issue on GitHub.
- Pin the "move over" issue, so that it stays on the top of the "Issues" tab in GitHub.
- Write documentation on "How to change your branch from main to master as a contributor" and pin it with a Issue, and put it in the README.md.
Moving over:
- Merge pull-request Changes to move from master to main as our default branch #1464 to:
- Change the tag_on_master script to use
main
instead ofmaster
. - Rename tag_on_master script to tag_on_main.
- Ensure travis.yml uses the renamed tag_on_main script.
- Ensure travis.yml uses the
main
branch for its tests. - Change the reference to
master
tomain
in atlas.json - Change a link in the translation documentation.
- Change a link in the bug report template.
- Create a
main
branch, and push it to the repository. - Copy the branch protection policies that are used on
master
to the newmain
branch. - Change the default branch from
master
tomain
on the repository settings page. - Re-target open pull-requests, this can be done manually by the pull owner, by going to the pull-request, and clicking on edit, and select the
main
branch as target for the pull. Or we can wait until GitHub has automated this. - Dependabot will migrate its own pulls to the new default branch automatically.
- Confirm that any changes to the ProGit2 book that come after the branch name change are reflected on the
git-scm
website after 24 hours. (They run a nightly build with the ProGit2 changes.) - Finally after ensuring everything still works, delete the
master
branch on the remote.
Benefits/drawbacks of proposal:
Benefits:
- The project will be more inclusive to people who are bothered by the
master
slave
connotation. - Give a good example on how to move a project over, so that other projects know the move can be done.
Drawbacks:
- There are currently 1600 forks/clones at least of this repository, including the translation projects, each of those will have to do some work after the move.
- The maintainers of the ProGit2 project will be quite busy with merging/closing pull-requests prior to the move. This will not be necessary if we wait until GitHub makes things easier later this year...
- There's a chance that we miss changing/updating something prior to the move, and we break something.
Related issues:
Further info:
More info and guidance from GitHub on moving a repo from master
to main
can be found at GitHub's official renaming repo.
Edits:
I've removed a previously listed drawback (breaking the old links to files on master
, as it's fixed by GitHub already...
Links to deleted branches now redirect to the default branch