I have a repository stored on the file system that I need to transfer to the HTTPS git repository. The problem is that the migrated repo is smaller than the original, 179M versus 545 MB, to be exact.
Here's what the original repo looks like:
$ tree -L 2 .git
.git/
βββ branches
βββ config
βββ FETCH_HEAD
βββ HEAD
βββ hooks
βββ index
βββ logs
β βββ refs
βββ objects
β βββ incoming_1638816568970138516.pack
β βββ incoming_2231423675192085195.pack
β βββ incoming_252567842603709439.pack
β βββ incoming_2956015230264054740.pack
β βββ incoming_3048626775278812485.pack
β βββ incoming_3322152774343971530.pack
β βββ incoming_3707332777993276763.pack
β βββ incoming_407171399829023385.pack
β βββ incoming_4072000993266381297.pack
β βββ incoming_4293432441900999175.pack
β βββ incoming_4833572675284287989.pack
β βββ incoming_4943537936436869872.pack
β βββ incoming_5555086829860720971.pack
β βββ incoming_5912835395946639495.pack
β βββ incoming_7273182803237175093.pack
β βββ incoming_7510898138918506599.pack
β βββ incoming_7865231230366160752.pack
β βββ incoming_8724975206375007218.pack
β βββ incoming_8787762604831244623.pack
β βββ incoming_9046531469688239004.pack
β βββ info
β βββ pack
βββ refs
βββ heads
βββ remotes
βββ tags
$ git branch -a
cli
max
codefactoring
* master
new-load-configuration
new-loader
plugins_dev
remotes/origin/cli
remotes/origin/max
remotes/origin/codefactoring
remotes/origin/master
$ du -sh .
545M .
This is the migration procedure that I followed:
$ mkdir temp_dir && cd temp_dir
$ git clone --mirror /path/to/original/repo
$ cd /path/to/original/repo
$ git remote add new-origin https://myuser@my.source.server/myuser/repo.git
$ git push new-origin --mirror
And then if I look at the resulting repo size, it's 179 MB.
Any idea what is going on here?
Thank.
Delta source
share