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

Re: Retrospectively add alternates to a repository?

From
Tay Ray Chuan <rctay89@gmail.com>
Date
Feb 27, 2010, 02:37 UTC
Message-ID
<be6fef0d1002261837g794e8df2yc92261d46f3235bd@mail.gmail.com>
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:
Show 7 quoted lines
> 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
Previous: Steve FollyNext: Jeff King
Message 2 of 7 in “Retrospectively add alternates to a repository?”
  1. Steve FollyFeb 26, 2010
  2. Tay Ray ChuanFeb 27, 2010
  3. Jeff KingFeb 27, 2010
  4. Steve FollyFeb 27, 2010
  5. Jeff KingFeb 27, 2010
  6. Felipe ContrerasMay 16, 2010
  7. Jeff KingMay 22, 2010

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.