I know this can be done on the Admin page of a repository. Another default branch can be set there. And that would be the answer of this question.
But I discovered (maybe a bug?) the following. If your master branch and develop branch are exactly the same, than a git clone will not clone the default “develop” branch, but still “master”!! If you commit something to the develop branch, remove your clone and than clone again, you will get the develop branch!
Is this Git behaviour or Github? And can this be fixed to set it ALWAYS to develop?
This is a git “feature”
I just tested it with local repo, and while the
HEADof my first repotestis “develop“:… the name of the default branch cloned in
test1ismaster!See “How do I change a Git remote
HEADto point to something besides “master”“:From the cloned repo perspective,
HEADon the remote origin repo references bothmasteranddevelop:And the order for determining the default branch of a cloned repo is: