Re: How de-duplicate similar repositories with alternates
- Date: Thu, 29 Nov 2018 10:55:49 -0800
- From: Stefan Beller <sbeller@xxxxxxxxxx>
- Subject: Re: How de-duplicate similar repositories with alternates
On Thu, Nov 29, 2018 at 7:00 AM Ævar Arnfjörð Bjarmason
> A co-worker asked me today how space could be saved when you have
> multiple checkouts of the same repository (at different revs) on the
> same machine. I said since these won't block-level de-duplicate well
> one way to do this is with alternates.
Another way is to use git-worktree, which would solve the gc issues
I view alternates as a historic artefact as the deduping
of objects client side can be done using worktrees, and on the
serverside - I think - most of the git hosters use namespaces
and put a fork network into the same repository and use pack islands.
Can you elaborate on why worktrees would not solve the problem?
(I initially was hesitant to use them as I liked going into .git and tempering
with files such as the config directly. But now I cannot `cd .git` any more;
it turns out the advantages outweigh this corner case that I was attached to)