git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tay Ray Chuan <rctay89@gmail.com>
To: Steve Folly <steve@spfweb.co.uk>
Cc: git@vger.kernel.org
Subject: Re: Retrospectively add alternates to a repository?
Date: Sat, 27 Feb 2010 10:37:25 +0800	[thread overview]
Message-ID: <be6fef0d1002261837g794e8df2yc92261d46f3235bd@mail.gmail.com> (raw)
In-Reply-To: <loom.20100227T004822-959@post.gmane.org>

Hi,

On Sat, Feb 27, 2010 at 7:54 AM, Steve Folly <steve@spfweb.co.uk> wrote:
> I have a local mirror of a remote repository (to save time
> cloning over a slow network).  But before I created the
> local mirror I already cloned the remote repo directly.
>
> Is it possible to retrospectively add an alternates spec
> to this local repository (the equivalent of doing what
> --reference does during the clone)?

yes, just make sure the objects/info/alternates file points to the
location of that cloned repo's object directory; for example:

  $ echo /path/to/cloned/repo/.git/objects > .git/objects/info/alternates

-- 
Cheers,
Ray Chuan

  reply	other threads:[~2010-02-27  2:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-26 23:54 Retrospectively add alternates to a repository? Steve Folly
2010-02-27  2:37 ` Tay Ray Chuan [this message]
2010-02-27  8:34   ` Jeff King
2010-02-27 11:43     ` Steve Folly
2010-02-27 12:30       ` Jeff King
2010-05-16 13:55         ` Felipe Contreras
2010-05-22  5:38           ` Jeff King

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=be6fef0d1002261837g794e8df2yc92261d46f3235bd@mail.gmail.com \
    --to=rctay89@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=steve@spfweb.co.uk \
    /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).