Repository navigation
Create GHA job to sync master with main - #15
Merged
Merged
Conversation
Supports a transition period where the default branch is renamed to `main`, but all changes are reflected on master as well such that folks who have installed bats-support by using master will continue to receive updates for some time.
martin-schulze-vireso
approved these changes
Jun 17, 2025
Member
Author
|
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.

Supports a transition period where the default branch is renamed to
main, but all changes are reflected on master as well such that folks who have installed bats-support by using master will continue to receive updates for some time.approach
This repo is still using the old
masterbranch name as the default branch. I propose we rename tomain.The impact to contributors is minimal as we can all handle the rename tasks ourselves. However, because git is not just the tool for development, but also for distribution, this change potentially impacts users, not just contributors.
A process I have used successfully on other repos (virtually all nodenv repos) to facilitate the master -> main rename:
At this point
mainis the official default branch and all work usesmain. However, themasterbranch is preserved (as any normal branch). Any timemainis modified, the job is triggered and force pushes tomasterto keep it in sync withmain. Thus any users who have their bats testing environment set up by cloning from master will continue to get the latest code. But sincemainis then the new default branch, any clones that do not explicitly referencemaster, will getmainas their default branch. So over time, references to master will gradually diminish. Eventually the sync job (and master branch) can just be deleted with drastically fewer (if any) users impacted.