Zulip Chat Archive

Stream: general

Topic: origin/main


Moritz Firsching (Apr 04 2023 at 19:04):

I find it a little bit confusing that there exists a branch main in mathlib,
https://github.com/leanprover-community/mathlib/tree/main
which is not the same as master.
In many other projects that I work on, mainis the current HEAD, so I have accidently checked out main once in a while. In order to prevent that happening to other people, could we perhaps just rename the main branch, for example to laughinggas/main or something. Would that be ok with you, @Ashvni Narayanan ?
If we want to prevent that in the future, probably someone with admin rights can set up a branch protection rule so that is becomes impossible to make a main branch, perhaps also in the mathlib4 repo.

Reid Barton (Apr 04 2023 at 19:06):

Did you switch main and master in the second half of your message?

Moritz Firsching (Apr 04 2023 at 19:12):

yes, making my point, I guess..

Moritz Firsching (Apr 04 2023 at 19:12):

Will edit...

Gabriel Ebner (Apr 04 2023 at 19:17):

I think you're still mixing up names. We do not have a single branch whose name starts with origin/. We already have a branch protection rule that prevents pushing to master.

Moritz Firsching (Apr 04 2023 at 19:19):

you are right, I will replace origin/main with main and origin/master with master in what I wrote, then it should be what I mean

Moritz Firsching (Apr 04 2023 at 19:24):

So my point is to also have a protection rule for main, and having no branch with that name to start with

Moritz Firsching (Apr 04 2023 at 19:26):

Just in case somebody else also has git checkout origin/main in their muscle memory.

Moritz Firsching (Jun 27 2023 at 10:37):

fyi, after talking to @Ashvni Narayanan I renamed the main branch to avoid confusion

Ashvni Narayanan (Jun 27 2023 at 10:39):

Thanks, and sorry for the confusion!


Last updated: Dec 20 2023 at 11:08 UTC