git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathieu Chouquet-Stringer <ml2news@free.fr>
To: git@vger.kernel.org
Subject: How to create and keep up to date a naked/bare repository?
Date: 26 Jan 2006 12:12:10 +0100	[thread overview]
Message-ID: <m37j8n9rat.fsf_-_@localhost.localdomain> (raw)
In-Reply-To: <7v1wyvn9pc.fsf@assigned-by-dhcp.cox.net>

        Hello,

I've got a couple of questions and reading (some of the files in) the
Documentation directory didn't really enlighten me...

Let's say I want to maintain a private (read-only) copy of a git repository
(eg git.git or linus-2.6.git). Because this repository is shared
internally (used by a bunch of boxes), I'd like to clone it as a bare
repo, no need to have the files checked out on my local master.

Cloning is done by running the following:
git clone --naked git://www.kernel.org/pub/scm/git/git.git git.git

Now I've got my repository. Because I'll share it with git-daemon, I touch
the git-daemon-export-ok file to export it.

The first problem arises when I try to keep this repo up to date.

If I try a git fetch or pull (more on that later), git complains because it
can't find a .git directory (which is correct as in a bare repository the
repository directory is the .git directory).

I can do a: GIT_DIR=. git fetch and it works but that's kind of ugly. I
can also link . to .git but it's as disgusting as the previous hack.

Maybe I'm missing something obvious here, is there an option to tell
fetch/pull that it's working with a bare repository?

The second question is I'd think I would have to use git fetch instead of
git pull as a pull is fetch + merge and merging wouldn't make much sense as
I didn't check out any files. Does it make any sense?

The third thing (can't reproduce ATM as I just got a fresh new clone) is
that git fetch was just fetching over and over the same objects...

Can anyone tell me what I'm doing wrong?

-- 
Mathieu Chouquet-Stringer
    "Le disparu, si l'on vénère sa mémoire, est plus présent et
                 plus puissant que le vivant".
           -- Antoine de Saint-Exupéry, Citadelle --

  reply	other threads:[~2006-01-26 11:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-25 13:00 [RFD] remembering hand resolve Junio C Hamano
2006-01-25 13:45 ` Andreas Ericsson
2006-01-25 23:56   ` Junio C Hamano
2006-01-26 11:12     ` Mathieu Chouquet-Stringer [this message]
2006-01-26 12:22       ` How to create and keep up to date a naked/bare repository? Junio C Hamano
2006-01-26 15:11         ` Mathieu Chouquet-Stringer
2006-01-26 18:27         ` Mathieu Chouquet-Stringer
2006-01-27  3:36           ` Junio C Hamano
2006-01-27 10:30             ` Refs naming after clone (was: Re: How to create and keep up to date a naked/bare repository?) Josef Weidendorfer
2006-01-27 13:34             ` How to create and keep up to date a naked/bare repository? Mathieu Chouquet-Stringer
2006-01-27 18:41               ` Junio C Hamano
2006-01-27 19:01                 ` J. Bruce Fields
2006-01-27 21:00                   ` Junio C Hamano
2006-01-29  9:10 ` [PATCH/RFC] git-rerere: reuse recorded resolve Junio C Hamano

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=m37j8n9rat.fsf_-_@localhost.localdomain \
    --to=ml2news@free.fr \
    --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).