One answer to the question "How to clone a git repository that has become too large?" "Reduce size by removing Large Blobs."
(I have to go on to clarify that the repo fix is βββbeyond the scope of this question,β however the comment also says, βIβm working for a quick fix so I can clone the repo right now,β so I am sending this answer because that: a) it is possible that they do not know about BFG and therefore overestimate the complexity of cleaning the repo, and b) it is really very fast.
To clear the repo easily and quickly, use BFG :
$ java -jar bfg.jar --strip-blobs-bigger-than 100M my-repo.git
Any old files larger than 100 MB (which are not included in your last commit) will be deleted from the git repository history. Then you can use git gc to delete dead data:
$ git gc --prune=now --aggressive
Once this is done, your repo will be much smaller and should be cloned without any problems.
Full disclosure: I am the author of BFG Repo-Cleaner.
Roberto tyley
source share