Skip to content

[Improvement] Rename default master branch to main #2570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
arturcic opened this issue Jan 29, 2021 · 13 comments · Fixed by #2573
Closed

[Improvement] Rename default master branch to main #2570

arturcic opened this issue Jan 29, 2021 · 13 comments · Fixed by #2573
Milestone

Comments

@arturcic
Copy link
Member

GitHub already added the feature to rename the default branch and re-target the PRs on the new default branch.

@GitTools/developers do you agree with that?

It will require also adapting the build scripts and maybe the code itself

@asbjornu
Copy link
Member

Yes, 👍🏼 from me.

@gep13
Copy link
Member

gep13 commented Jan 29, 2021

Seems like a good idea to me!

@dazinator
Copy link
Member

Whats the benefit?

@asbjornu
Copy link
Member

There's a lot of good information here, @dazinator.

@dazinator
Copy link
Member

Oh dear. Politics.
I guess everyone who works in master data management is hoping they will go under the radar of this particular political agenda!

@arturcic arturcic added this to the 5.6.5 milestone Feb 1, 2021
@GeertvanHorrik
Copy link
Contributor

GeertvanHorrik commented Feb 1, 2021

@arturcic is this a "visual" / GitVersion branch change only or also a behavioral runtime change in how GitVersion works?

The reason I ask is because I see lots of unit tests changing from master => main but I think we should actually duplicate and test both master and main (and leave it it to the users whether they want to go ahead with this "main branch thing").

@arturcic
Copy link
Member Author

arturcic commented Feb 1, 2021

@GeertvanHorrik the tests internally use main to make it consistent, but master is still supported. I introduced the constant MainBranch that is used in the tests, and before the switch it had the master value. This is for the internal code only. As for the consumer, default is main, but you can also use the master in GitVersion.yml as there is a compatibility added.

@arturcic
Copy link
Member Author

arturcic commented Feb 1, 2021

That means projects that were using the GitVersion before this change will continue to work

@GeertvanHorrik
Copy link
Contributor

Thanks for the explanation, then I don't mind, as long as it's not a breaking change for people sticking with master 👍

@gep13
Copy link
Member

gep13 commented Feb 1, 2021

This is a nice touch...

image

Got that when browsing to repository after rename.

@github-actions
Copy link

github-actions bot commented Feb 7, 2021

🎉 This issue has been resolved in version 5.6.5 🎉
The release is available on:

Your GitReleaseManager bot 📦🚀

@david-driscoll
Copy link
Contributor

Just an FYI I found that this causes a failure when using a branch configuration that currently references master. Changing the source-branches fixes the problem however that seems like an accidental breaking change. ❤️

assembly-versioning-scheme: MajorMinorPatch
mode: ContinuousDeployment
continuous-delivery-fallback-tag: ci
next-version: 0.1.0
branches:
  next:
    regex: ^next$
    mode: ContinuousDeployment
    tag: next
    increment: Major
    prevent-increment-of-merged-branch-version: false
    track-merge-target: false
    tracks-release-branches: false
    is-release-branch: false
    source-branches: ['master']
ignore:
  sha: []

@asbjornu
Copy link
Member

asbjornu commented Feb 8, 2021

@david-driscoll, this should have been fixed in #2588.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants