git clone issue: repo too large? (50m)

Been having an issue with being unable to clone a git repo. It starts to run and then cancels half way through.
My current git repo size is 53.7 MB
Git version is on server and on my remote.

Error below:

  • How to merge files from one branch's directory into another branch?
  • git merge with renamed files
  • Move issues from Bitbucket to Github
  • How to get blame information of a line of code on a repository from github API
  • MS Access, Is there any way to develop by more than 1 people?
  • Git remove files from repository, Github and commiters
  • MacBook-Pro:htdocs macbook$ git clone 
    Cloning into 'myrepo'...'s password:
    remote: Counting objects: 8888, done.
    remote: Compressing objects: 100% (7185/7185), done.
    Write failed: Broken pipe267/8888), 1.03 MiB | 1001.00 KiB/s
    fatal: The remote end hung up unexpectedly
    fatal: early EOF
    fatal: index-pack failed

    I created a fresh new repo, clones just fine. Once I add my site files to it and push them to the remote though. I can no longer clone from it. But I can pull from it just fine.

    I added this with no luck:

        compression = -1
        windowMemory = 10m
        packSizeLimit = 20m

    I tried upping these both to way higher values. No luck

    I also tried running git gc --aggressive and git gc --prune on the remote repo.

    I’ve seen this post, but mine is no where as large (1g+)
    Also see a people having issues with the git versions not matching, but this isn’t the case ether.

  • How to make a copy of GitHub repository at each commit using GitPython package in Python
  • is it possible to add a comment to a diff file (unified)?
  • Evil merges in git?
  • Bower - enogit git is not installed or not in the PATH
  • Pull a commit from a Gerrit repository using its commit ID only
  • How do I make the Xcode Continuous Integration service perform shallow git clones?
  • 2 Solutions collect form web for “git clone issue: repo too large? (50m)”

    I think the problem you are having is your clone breaks off in the middle every time.

    So, instead of cloning a repo again and again from scratch everytime, I would suggest you instead do a fetch on a freshly created repo.

    Basically, initialize an empty repository

    cd repo_name && git init

    Add the original repo as a remote in this repo

    git remote add origin url/to/repo

    And now do a git fetch.

    This way, even if your clone breaks in the middle, fetch will take care to bring in unfetched objects only in next run.

    Alternatively, you can check the solutions here and here.

    Also try increasing your postBuffer

    git config --global http.postBuffer 1048576000

    Git Baby is a git and github fan, let's start git clone.