can't push huge git commit

2.4k Views Asked by At

I have a huge 11Gb repo with Android sources. I created repo with "git init", then one single commit with "git commit --all ." I can't push it to remote repo, when I issue "git push -u origin --all" It's stuck with executing "git pack-objects --all-progress-implied --revs --stdout --thin --delta-base-offset --progress" . Speed of reading data is just about 1Mb/s as iotop says. bitbucket refuses with message "fatal: The remote end hung up unexpectedly" and nothing is yet pushed as git does the job locally. How to disable this packing and go further?

2

There are 2 best solutions below

1
On BEST ANSWER

git gc helps.

/s/wand$ git gc
Counting objects: 346126, done.
Compressing objects: 100% (328144/328144), done.
Writing objects: 100% (346126/346126), done.
Total 346126 (delta 67519), reused 0 (delta 0)
Removing duplicate objects: 100% (256/256), done.
Checking connectivity: 346126, done.
/s/wand$ git push -u origin --all
Counting objects: 346126, done.
Compressing objects: 100% (260625/260625), done.
Writing objects: 100% (346126/346126), 3.11 GiB | 2.62 MiB/s, done. 
Total 346126 (delta 83231), reused 330414 (delta 67519)
To [email protected]:repu1sion/wand.git
 * [new branch]      master -> master
Branch master set up to track remote branch master from origin.
4
On

Your repository is way too big for Bitbucket:

In order to improve and maintain the overall performance for everyone who uses Bitbucket, we are rolling out size limits on newly-created repositories. Starting [May 30, 2014], repository size limits will be:

  • Soft limit of 1 GB – In-product and email notifications will give you a heads-up that you’re approaching the limit.
  • Hard limit of 2 GB – Pushing to the repository will be disabled until you’re back under the limit.