git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* how to reduce disk usage for large .git dirs?
@ 2014-11-13 11:14 Olaf Hering
  2014-11-13 11:49 ` Fredrik Gustafsson
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Olaf Hering @ 2014-11-13 11:14 UTC (permalink / raw)
  To: git


How can I reduce the disk usage for multiple copies of the same repo?

Up to now I just made copies like this, but since .git alone is already
2GB it becomes expensive:

 # git clone git://host/repo.git repo-master
 # cp -a repo-master repo-branchA
 # cd repo-branchA
 # git checkout -b branchA origin/branchA
 # cd -
 # cp -a repo-master repo-branchB
 # cd repo-branchB
 # git checkout -b branchB origin/branchB
 # cd -
 # cp -a repo-master repo-branchB-feature
 # cd repo-branchB-feature
 # git checkout -b branchB-feature origin/branchB
 # cd -


Since each .git is almost identical I wonder if there is a reliable way
to "share" it. The "git clone" man page mentions --shared as a dangerous
way to do things. It does not give an advice how to manage such cloned
trees.

So how can I reduce the disk usage needed for the four .git dirs above?
I looked around in the docs that came with my git-2.1.3 package, but
found nothing that answers my question. Maybe we can workout something
and add it to one of the existing docs.

Thanks!

Olaf

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2014-11-25 14:33 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-13 11:14 how to reduce disk usage for large .git dirs? Olaf Hering
2014-11-13 11:49 ` Fredrik Gustafsson
2014-11-13 12:03   ` Olaf Hering
2014-11-14 12:32     ` Jakub Narębski
2014-11-13 12:02 ` Roger Gammans
2014-11-13 12:21   ` Olaf Hering
2014-11-13 12:09 ` Duy Nguyen
2014-11-13 15:44 ` Olaf Hering
2014-11-13 16:03   ` Fredrik Gustafsson
2014-11-13 16:08     ` Johan Herland
2014-11-13 20:15       ` Jeff King
2014-11-14 10:14     ` Olaf Hering
2014-11-14 10:24       ` Fredrik Gustafsson
2014-11-14 10:30         ` Olaf Hering
2014-11-14 10:54           ` Olaf Hering
2014-11-14 11:24     ` Olaf Hering
2014-11-14 15:06       ` Andreas Schwab
2014-11-25 14:32         ` Olaf Hering

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).