Re: mirroring and development with three levels of repositories?

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

 



* John Clemens <clemej@xxxxxxxxx> 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@xxxxxxxx
 mobile: +49 151 27565287  icq:   210169427         skype: nekrad666
----------------------------------------------------------------------
 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------
--
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]