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

Re: Local clones aka forks disk size optimization

From
Andrew Ardill <andrew.ardill@gmail.com>
Date
Nov 15, 2012, 00:53 UTC
Message-ID
<CAH5451m4saVa7-NLbVbXp7q8ca5_0N4FLk3wYaqxLT=AE5frbw@mail.gmail.com>
In-Reply-To
<CALZVap=kOwOpxeu8+_+5uQYZz3GNC8Ep_JeK7WCQHtu+Hn3rUw@mail.gmail.com>
On 15 November 2012 11:40, Javier Domingo <javierdo1@gmail.com> wrote:
Show 7 quoted lines
> Hi Andrew,
>
> The problem about that, is that if I want to delete the first repo, I
> will loose objects... Or does that repack also hard-link the objects
> in other repos? I don't want to accidentally loose data, so it would
> be nice that althought avoided to repack things, it would also
> hardlink them.
Hi Javier, check out the section below the one I linked earlier:
Show 14 quoted lines
> How to stop sharing objects between repositories?
>
> To copy the shared objects into the local repository, repack without the -l flag
>
> git repack -a
>
> Then remove the pointer to the alternate object store
>
> rm .git/objects/info/alternates
>
> (If the repository is edited between the two steps, it could become corrupted
> when the alternates file is removed. If you're unsure, you can use git fsck to
> check for corruption. If things go wrong, you can always recover by replacing
> the alternates file and starting over).
Regards,
Andrew Ardill
Previous: Javier DomingoNext: Javier Domingo
Message 4 of 13 in “Fwd: Local clones aka forks disk size optimization”
  1. Javier DomingoNov 14, 2012
  2. Andrew ArdillNov 15, 2012
  3. Javier DomingoNov 15, 2012
  4. Andrew ArdillNov 15, 2012
  5. Javier DomingoNov 15, 2012
  6. Andrew ArdillNov 15, 2012
  7. Sitaram ChamartyNov 15, 2012
  8. Michael J GruberNov 16, 2012
  9. Enrico WeigeltNov 16, 2012
  10. Sitaram ChamartyNov 18, 2012
  11. Enrico WeigeltNov 18, 2012
  12. Pyeron, Jason J CTR (US)Nov 16, 2012
  13. Jörg RosenkranzNov 18, 2012

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.