From: Hallvard Breien Furuseth Date: Thu, 03 May 2012 12:23:59 GMT Subject: Re: Newbie grief Message-ID: <63c4e1944dcfd03e8c9ff324080ff62f@ulrik.uio.no> In-Reply-To: <947c3d6ae263495985543764a57c3fbb-mfwitten@gmail.com> On Wed, 02 May 2012 15:21:29 -0000, Michael Witten wrote: >On Wed, 02 May 2012 16:21:07 +0200, Hallvard Breien Furuseth wrote: >> And in a bare repository: >> >> git init --bare foo.git >> cd foo.git >> git remote add bar ../bar.git >> git fetch bar >> --> adds bar/master etc. >> >> For some reason, 'git clone --bare' does not treat the cloned >> repository the same way - it just copies it under refs/heads/ >> instead of refs/remotes/, without even adding it as a remote. > > What do you mean? I mean 'git clone --bare bar.git foo.git' does not give foo.git a remote named 'origin' with a branch origin/master. Not sure if there is a _simple_ way to do it well either. init + fetch above does not try to hardlink objects/packs like clone does. > (...) > $ git init bar.git; cd bar.git > $ echo a > a; git add a; git commit -m a; cd .. > $ git clone --bare bar.git foo.git; cd foo.git $ git branch -a * master > $ git remote add bar ../bar.git > $ git fetch bar -- Hallvard