Re: git fetch inside a bare repo does nothing

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

 



On Fri, Jul 13, 2007 at 12:33:03PM +0200, Peter Baumann wrote:
> kblin on IRC wanted to know how to update a bare repo with fetching.
> He wants to have a bare repo of samba as a mirror and clone from this
> mirror to avoid network traffic and to have several git repos which
> could all have a different branch checked out. For a better description
> see [1].
> 
> I suggested to use "git fetch --bare" inside the bare repo, but this
> doesn't work. So what I'm asking now if this is intenional behaviour or
> a bug, so please could someone  shed some light on it?  Or how is the
> prefered method to update a bare repo *without* pushing to it?

"git fetch" works fine in a bare repo. The issue you're probably having is
that "git clone --bare" does not add a [remote "origin"] section to the
config file like regular "git clone" does, so "git fetch" has nothing to
do. Just add a remote section (either with "git remote add" or manually) and
regular "git fetch" will work fine.

Just for reference, this is the remote section that is equivalent to the
original "git clone --bare your_uri_here":

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


-- 
CJ van den Berg

mailto:cj@xxxxxxxxxxxxx
  xmpp:cj@xxxxxxxxxxxxx

Attachment: signature.asc
Description: Digital signature


[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]

  Powered by Linux