All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Baumann <waste.manager@gmx.de>
To: CJ van den Berg <cj@vdbonline.com>
Cc: git@vger.kernel.org
Subject: Re: git fetch inside a bare repo does nothing
Date: Fri, 13 Jul 2007 13:54:26 +0200	[thread overview]
Message-ID: <20070713115426.GA4608@xp.machine.xx> (raw)
In-Reply-To: <20070713113209.GA9046@prefect.vdbonline.net>

On Fri, Jul 13, 2007 at 01:32:10PM +0200, CJ van den Berg wrote:
> 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/*
> 
> 
Thx. This wasn't exactly my problem but it lead me to the real problem:
I used
	git fetch /path/to/repo master

and had forgotten that I had to specify the local ref, too.

	git fetch /path/to/repo master:master

worked as expected. Sorry for the noise.

-Peter

  reply	other threads:[~2007-07-13 11:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-13 10:33 git fetch inside a bare repo does nothing Peter Baumann
2007-07-13 11:32 ` CJ van den Berg
2007-07-13 11:54   ` Peter Baumann [this message]
2007-07-13 12:48 ` Alex Riesen
2007-07-13 17:16   ` Peter Baumann

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=20070713115426.GA4608@xp.machine.xx \
    --to=waste.manager@gmx.de \
    --cc=cj@vdbonline.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.