3

I have uploaded Drupal theme in sandbox. My total theme file size is less than 1MB, but inside .git folder have pack files (file size is 21MB).

How to reduce pack file size?

git gc
git repack
git verify-pack -v .git/objects/pack/pack-*.idx

But still have same file size.

shytikov
  • 9,155
  • 8
  • 56
  • 103
shanidkv
  • 1,118
  • 1
  • 9
  • 12

1 Answers1

0

Unfortunately you will gain much space from this cleanup operations. The repository size driven by number of changes done to the source code. Also consider following, if your theme involves usage of binary files (for example images), and these files changed a number of times, git will store that binary file 'from scratch' i.e. not like a difference with previous version, but as completely new file.

Thus having ten revisions of one file with 100 Kb size even if you changed only one bit in it will cost you around megabyte.

I believe you need to choose: either ship whole theme history with you or save disk space. Not both.

shytikov
  • 9,155
  • 8
  • 56
  • 103