Skip to content

Proposal: migrate ProGit2 default branch from master to main #1463

@HonkingGoose

Description

@HonkingGoose

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:

Moving over:

  • Change the tag_on_master script to use main instead of master.
  • 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 to main 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 new main branch.
  • Change the default branch from master to main 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:

#1462

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

Source: https://github.blog/changelog/2020-07-17-links-to-deleted-branches-now-redirect-to-the-default-branch/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions