Re: git clone - not getting the correct default branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 18 Apr 2012 14:05:14 +0100, Luke Diamand <luke@xxxxxxxxxxx> wrote:
> A bit weird this.
> 
> I have a bare repo (managed with gitolite) which, when I clone it,
> always comes up with origin/HEAD pointed to origin/master.
> 
> This despite the fact that on the repo, HEAD is a symbolic ref to origin/dev.
> 
> i.e.
> 
> % git clone git@myserver:myrepo
> ...
> % git branch
> * master
> 
> % ssh myserver
> % cd /path/to/myrepo.git
> % cat HEAD
> ref: refs/heads/dev
> 
> What could be going wrong? Other repos don't have this problem.

Does master and dev in the repo on the server point to the same commit?
Because the git protocol does not expose which *branch* HEAD points to, only
which *commit*. So if two branches point to the same commit, git just takes
the first branch and points the local HEAD to that.

tom
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]