Fetching a newly created branch via bzr-git

Jelmer Vernooij jelmer at samba.org
Fri Apr 27 13:05:11 UTC 2012


On Fri, Apr 27, 2012 at 08:15:11AM -0400, Gordon Tyler wrote:
> On Fri, Apr 27, 2012 at 7:25 AM, Jelmer Vernooij <jelmer at samba.org> wrote:
> 
> > > Btw, what is that "(default)" branch that "bzr branches" shows as
> > > being current after the initial git-import?  There's no such branch in
> > > the repo, and .bzr/branches/ directory doesn't have a subdirectory for
> > > it.  Wouldn't it be better if the default were "master"?
> > The (default) branch is what corresponds to HEAD in git. We can't
> > simply name that branch "master" since that would conflict with the
> > actual master branch, which can be different from HEAD.
> As I understand it,  HEAD in a git repo is the ref that points to the
>  "current" or default branch. So, theoretically, it should be pointing to
> an existing ref (branch). So why is it created or listed as a separate
> branch?
HEAD in a git repo is just a ref. It is possible for refs to point at
other refs (a "symbolic" ref). HEAD is usually a symbolic ref, but
this isn't necessarily the case. It can also just point at an
arbitrary revision.

HEAD is the branch that's used by the working copy. This is the
equivalent to the "default" branch in Bazaar.

Cheers,

Jelmer



More information about the bazaar mailing list