git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Dmitry A. Ashkadov" <dmitry.ashkadov@gmail.com>
To: "Carlos Martín Nieto" <cmn@elego.de>, git@vger.kernel.org
Subject: Re: fetch for bare repository
Date: Fri, 13 Jan 2012 17:54:31 +0400	[thread overview]
Message-ID: <4F103797.7060906@gmail.com> (raw)
In-Reply-To: <20120113134058.GB2850@centaur.lab.cmartin.tk>

13.01.2012 17:40, Carlos Martín Nieto пишет:
> On Fri, Jan 13, 2012 at 02:42:03PM +0400, Dmitry A. Ashkadov wrote:
>> Hello!
>>
>> I can't understand how to fetch branches from external repository
>> for bare repository.
> What you probably want is a mirror (git clone --mirror). Unless you
> tell git that you want a mirror, it's going to assume that you want a
> bare repo to push your own changes up to it. Such a repo has no need
> to be kept up to date, so clone doesn't set up any fetch refspecs.

I don't have access to an origin repository. So, I need bare repository 
and push changes up to it. So, I think the word "mirror" isn't 
applicable to private repository.

> Stepping back, do you need to fetch those branches into the private
> repo? If you still have access to the main repo and that's where the
> main project development is happening, why not use upstream's repo to
> get those changes to your local repo (as in the one you use to work)?
> It sounds like you're trying to replicate a centralised VCS'
> workflow. Git works like a network and you can merge a branch from
> upstream if you need to and then push to the private repo.

Yes, I can add one more remote to my local repository, then fetch 
changes from it and push it to private repository. But I thought that 
update private repository is the best way.

Thank you!

  reply	other threads:[~2012-01-13 13:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-13 10:42 fetch for bare repository Dmitry A. Ashkadov
2012-01-13 13:40 ` Carlos Martín Nieto
2012-01-13 13:54   ` Dmitry A. Ashkadov [this message]
2012-01-13 15:18     ` Carlos Martín Nieto

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=4F103797.7060906@gmail.com \
    --to=dmitry.ashkadov@gmail.com \
    --cc=cmn@elego.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).