0

I have two git clone (say A and B ) from a commun huge origin. They are both on the same disk/partition. I want them to share by hardlink their commun objects.

I could create a new local copy "git clone A C" and add B as a remote fetch everything then erase B and rename C to B, but I know there is a better way. What is the command to recreate hardlink between existing git repos?

  • https://git.wiki.kernel.org/index.php/Git_FAQ#How_to_share_objects_between_existing_repositories.3F – Mark Adelsberger Mar 06 '18 at 16:31
  • It is using alternates instead of hardlink so it is not exactly what I was asking. It seems to address my issue (I'd like to save disk space). But I tested it, and after the "repack -a -d -l" my disk usage increased significantly instead of shrinking. So it is not really helping me. – Patrick Lacasse Mar 06 '18 at 17:48

0 Answers0