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

Re: Make a non-bare repo bare.

From
Sitaram Chamarty <sitaramc@gmail.com>
Date
Jul 17, 2009, 01:20 UTC
Message-ID
<2e24e5b90907161820o5ee24491j8744a8652e7dec26@mail.gmail.com>
In-Reply-To
<7v8wio8i73.fsf@alter.siamese.dyndns.org>
On Fri, Jul 17, 2009 at 2:21 AM, Junio C Hamano<gitster@pobox.com> wrote:
> Sitaram Chamarty <sitaramc@gmail.com> writes:
Show 17 quoted lines
>> The linked procedure uses git clone --bare.  It is my belief (and
>> please correct me if I'm wrong) that only a git clone --mirror
>> actually does what you want here -- a mere "bare" clone would lose
>> your remotes and their tracking branches would it not?
>
> Depends on "what you want here".
>
> I assumed that the request was to set up the most typical use of a bare
> repository, that is to prepare a distribution point, separate from your
> primary working repository with a work tree, from which you push your
> updates into this new bare repository.
>
> And in such a distribution point, you do not need nor want remotes.  The
> point of remote tracking branches is to let you peek what others are doing
> and merge with them, and that is done while you advance your history in
> your primary working area with the work tree.  It does not happen in your
> distribution point.
I agree, bares dont have remotes, normally.

I was speaking purely from a technical point of view. Contrast, if you will, with the other method seen in the thread and elsewhere (the mv repo/.git repo.git, rm -rf repo, git config core.bare in repo.git stuff), which does preserve all this.

Anyway, you confirmed my _understanding_ of clone bare versus clone mirror, which is what I was looking for. Thanks!

Sitaram
Previous: Junio C Hamano
Message 13 of 13 in “Make a non-bare repo bare.”
  1. Tim VisherJul 15, 2009
  2. Paolo BonziniJul 15, 2009
  3. Tim VisherJul 16, 2009
  4. Jeff KingJul 16, 2009
  5. Junio C HamanoJul 16, 2009
  6. Graeme GeldenhuysJul 16, 2009
  7. Mike RalphsonJul 16, 2009
  8. Junio C HamanoJul 16, 2009
  9. Sitaram ChamartyJul 17, 2009
  10. Sitaram ChamartyJul 16, 2009
  11. Tim VisherJul 16, 2009
  12. Junio C HamanoJul 16, 2009
  13. Sitaram ChamartyJul 17, 2009

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.