git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Enrico Weigelt <weigelt@metux.de>
To: git@vger.kernel.org
Subject: Re: mirroring and development with three levels of repositories?
Date: Tue, 28 Sep 2010 19:37:11 +0200	[thread overview]
Message-ID: <20100928173710.GA31419@nibiru.local> (raw)
In-Reply-To: <AANLkTinFiOA6Grzk16W2D=k8Xt+EgTanrS7iryW2evop@mail.gmail.com>

* John Clemens <clemej@gmail.com> wrote:

> Short question:
> It it possible for a bare repository to have both local (company-wide) and
> remote (mirroring upstream) branches, as well as serving those branches to our
> devs? If so, how?

Yes. Just set up the proper remotes in the config files (same as w/
non-bare repos). The main problem for you might be that the hub-repo's
remotes wont show up as remotes in it's clones - that's because per
default only remote's refs/heads/* namespace is mapped into local's
refs/remotes/*.

Most convenient would probably doing this in the local hub repo.
Add a proper fetch statement in the upstream remote's config section.
Suppose the upstream's remote name is "origin":


[remote "origin"]
    url = ...
    fetch = +refs/heads/*:refs/heads/origin/*
    fetch = +refs/tags/*:refs/tags/origin/*

This will make the upstream's heads and tags as they were pushed
to the hub repo directly, but with the "origin/" prefix.

> $ git clone http://local-server/local-mirror.git
> Initialized empty Git repository in /home/clemej/git/local-mirror/.git/
> warning: remote HEAD refers to nonexistent ref, unable to checkout.

What does the refs/HEAD file tell in the local mirror repo ?
 

cu
-- 
----------------------------------------------------------------------
 Enrico Weigelt, metux IT service -- http://www.metux.de/

 phone:  +49 36207 519931  email: weigelt@metux.de
 mobile: +49 151 27565287  icq:   210169427         skype: nekrad666
----------------------------------------------------------------------
 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------

  reply	other threads:[~2010-09-28 17:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-28 17:25 mirroring and development with three levels of repositories? John Clemens
2010-09-28 17:37 ` Enrico Weigelt [this message]
2010-09-28 18:27   ` John Clemens
2010-09-28 18:41     ` Enrico Weigelt
2010-09-29  1:58       ` John Clemens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100928173710.GA31419@nibiru.local \
    --to=weigelt@metux.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).