Repository navigation
Rename master branch as main - #59
Merged
Merged
Conversation
martin-schulze-vireso
approved these changes
Mar 26, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I think we should move to the new default branch (
main) instead ofmaster.If the majority of users of this repository were only contributors, we could rename it and run the few commands to update our clones. However, cloning this repository is also an installation mechanism for many. For that reason, I don't think we can simply rename because that would "break" installations made via cloning. (It probably wouldn't break that many installs but it could leave them without the means to upgrade by pulling.)
Proposal
Downstream clones only need a
masterbranch to exist in order to continue to pull updates. It needn't actually be the default branch. So I propose that we use the workflow in this PR. It responds to push events to themainbranch (and manualworkflow_dispatchevents, when necessary). With that workflow in place, we can rename (using github's UI to change the default branch) tomain. We'll document (in the readme) the steps necessary to update one's default branch locally to track the new default.Any new clones of the repo will automatically use the new
mainas default, while old clones will continue to work by pulling from the legacy master branch (kept in sync by the workflow). Over time, the number of clones still pointing to the legacy master branch should diminish and eventually we can just delete this workflow and the master branch.I would then propose we follow this process for every bats-core repo still using master.