From: Leo Razoumov Date: Sun, 28 Sep 2008 13:23:47 GMT Subject: Re: strange "git clone" behavior wrt an active branch Message-ID: In-Reply-To: On 9/28/08, Santi Béjar wrote: > On Sun, Sep 28, 2008 at 2:05 PM, Leo Razoumov wrote: > > Hi All, > > I am using the latest stable version git-1.6.0.2. > > > > The man page for git-clone states explicitly that "git clone" > > > > " Clones a repository into a newly created directory, ...[snip]... > > and creates and checks out an initial branch equal to the > > cloned repository's currently active branch. " > > > > I noticed that while my active branch "My" happens to point to the > > same commit as the "master" the git clone will check out master > > instead of My (currently active branch). Is it a bug? > > > > > Currently it is only guessed which is the active branch (with a > preference for the master branch as it is the default), as the current > protocol does not allow tranfering the ref links: This is quite unfortunate design decision. There can be any number of local branches referring to the same commit. Without being able to pick into .git/HEAD it is impossible to decide which of them is "active". --Leo--