Page 1 of 1

Multiple default branches

Posted: Wed Feb 13, 2019 11:39 am
by al2950
I have noticed recently that multiple (3) default branches have appeared. Just wanted to check it was not an accident . It looks like it might be a git thing!

Re: Multiple default branches

Posted: Sat Feb 16, 2019 1:06 pm
by Zonder
you can't have more than 1 default :D

sure your local not messed up in some way?

Re: Multiple default branches

Posted: Wed Feb 20, 2019 8:38 pm
by al2950
Although by default you can only have 1 branch head you can force it too have multiple. However you are correct as my repo is really messed up! Not sure how it happened as this repo has only been used for ogre 2.x patches :?

Re: Multiple default branches

Posted: Wed Feb 20, 2019 11:56 pm
by dark_sylinc
Zonder wrote:
Sat Feb 16, 2019 1:06 pm
you can't have more than 1 default :D

sure your local not messed up in some way?
That's for git. In Mercurial you can have multiple heads for the same branch, and they're all "valid".

When it comes to the default branch, Pavel works on git and then ports his changes to Mercurial. Sometimes it gets screwed up and an alternate history gets created (i.e. two heads with nearly-identical commit ancestry until the common commit where the split happened appears). When we find out about this, we strip the bad dupe.

But if you pulled from the repo while the dupes weren't fixed, you have to strip the dupes from your local repo as well (using the strip extension, Modify History -> Strip) otherwise it gets messed up, or just clone the repo again from scratch.
If you don't do this and later it happens again, and you pull, you may end up with more than one dupe (i.e. 3 heads, then 4 heads, 5 heads...)

Re: Multiple default branches

Posted: Thu Feb 21, 2019 12:53 pm
by al2950
Ah ha, I knew it... Stupid git :wink: !

Thanks for the info