Git clone - default branch

After cloning the git repository from my gitlab server, it is not a validation wizard, since origin / HEAD points to some other "origin / foo" branch. In gitlab, the default branch is set to master.

How to transfer the start / HEAD from "origin / foo" to point to "origin / master" so that additional clones automatically check the start / master?

Right after git cloning, the remote display states show:

HEAD branch: foo

git remote -r seconds, which:

origin/HEAD -> origin/foo

I want the HEAD branch to point to master, although - inside gitlab - the default branch is already set to master.

+4
source share
3 answers

. GitLab , ( ), " " ( ).

Screenshot of the GitLab project settings page

-, ( 2016 ), , , GitLab, HEAD, git remote show origin. GitLab - , , @rralf.

+3

Paul Hicks, , git (.. 1.8.5, 1.8.4.3), .

, HEAD , . clone git HEAD -> ... , HEAD. , - , , - .

. , , - , , HEAD, . , , , ID.

( , , , , , GitLab , Linux, t CentOname, .)

+2

, . - :

git .

HEAD .

0

All Articles