Warning This document has not been updated for a while now. It may be out of date.Last updated: 20 Apr 2021
How to switch a Git default branch from master to main
These steps are for switching the default branch of a repo to
- Rename the
masterbranch in GitHub to
mainfor that repo. See instructions from Github for renaming an existing default branch.
- Update the Release app:
- Go to the app entry from the listing.
- Hit the
- Switch under the dropdown for
GitHub repository default branch.
- Set the Jenkins build number (the last
- Rebuild the latest
mainbranch build which would have started automatically by Jenkins when the branch was renamed, but with the incorrect build number (and therefore is likely to have failed).
- Switch your local branch, otherwise you might rebase the wrong branch by mistake!
- Update the list of apps on the Trello card
Additional things to check
- Update references in Jenkins to pulling down the
masterbranch of the app. See example.
- Update the Pact tests to run against the