Why is a bare git repo 1/4 the size of a non-bare? -


I have cloned a local repo in two separate repos: one bare and one non-bare bare 750 MB And non-bare 3 GB as I can "convert" freely between two, the same information should be both in both bare and unrivaled stores. So how can the non-banner be four times bigger once?

I think it should be doubled, because every file needs to be in both .git and work directory. But why four times?

files stored in .git / objects are often packed. This means that they are compressed and do not combine with block boundaries. Rather, there are many small files in the checkout. I would not be surprised if the ratio is better when using better filing, such as better packing of smaller files such as BTRFF, therefore, both aspects of your .git / objects Meet together in the directory being relatively small. This happens when you have not forgotten for git gc ; -)

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -