git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: fetch for bare repository

From
DADmitry A. Ashkadov <dmitry.ashkadov@gmail.com>
Date
Jan 13, 2012, 13:54 UTC
Message-ID
<4F103797.7060906@gmail.com>
In-Reply-To
<20120113134058.GB2850@centaur.lab.cmartin.tk>
13.01.2012 17:40, Carlos Martín Nieto пишет:
Show 9 quoted lines
> 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.

Show 7 quoted lines
> 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!
Previous: Carlos Martín NietoNext: Carlos Martín Nieto
Message 3 of 4 in “fetch for bare repository”
  1. Dmitry A. AshkadovJan 13, 2012
  2. Carlos Martín NietoJan 13, 2012
  3. Dmitry A. AshkadovJan 13, 2012
  4. Carlos Martín NietoJan 13, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.