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

Re: Sharing repositories later on

From
Linus Torvalds <torvalds@osdl.org>
Date
Jul 12, 2006, 15:47 UTC
Message-ID
<Pine.LNX.4.64.0607120843570.5623@g5.osdl.org>
In-Reply-To
<20060712132800.GA7328@harddisk-recovery.com>
On Wed, 12 Jul 2006, Erik Mouw wrote:
> 
> I just learned out about "git clone -s" to share objects between
> repositories. How do I use that with already existing repositories?
Do
	echo "/source/git/project/.git/objects/" > .git/objects/info/alternates
and then follow it up with
	git repack -a -d -l

where the "-l" means that it will only put _local_ objects in the pack-file (strictly speaking, it will put any loose objects from the alternate tree too, so you'll have a fully packed archive, but it won't duplicate objects that are already packed in the alternate tree).

		Linus
Previous: Erik Mouw
Message 4 of 4 in “Sharing repositories later on”
  1. Erik MouwJul 12, 2006
  2. Junio C HamanoJul 12, 2006
  3. Erik MouwJul 12, 2006
  4. Linus TorvaldsJul 12, 2006

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.