top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

Git clone out of memory on Windows

0 votes

I am unable to clone my repository. I get a message of out of memory. The server is located on Hyper-V running on Win Server 2008 R2 SP-1
The OS is Windows 7 64BIT.

posted May 30, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

0 votes

I assume c:\repo is your bare repository on the server.

Do the following:
1.) Backup the bare repository on the server to c:\repo-backup
From now on work exclusively on the backup!
2.) Check the repository for consistency
git fsck --full --strict
3.) Do manual garbage collection
git gc

Retry cloning the repository.
If that does still not work, it might be the case that delta compression on the server is tried and leads to memory exhaustion.

Do you have added large (> 100MB) files recently and already pushed to the repository?

If yes, I'd suggest to set low enough limits for the window sizes. My settings on the server side are [core]

packedGitLimit = 512m 
packedGitWindowSize = 512m 
bigFileThreshold = 256m 

deltaCacheSize = 256m 
windowMemory   = 256m 

which are good enough to be able to clone repositories with >1GB binary files inside. Note that my settings are for a 64-bit git on linux.

To prevent delta compression of big files on the client side beforehand use the delta flag of git attributes 1
contents of top level .gitattribute *.rar -delta

Click Here to know the answer(Hope this Link will work )

If your problem will still be there then please follow this link

answer Mar 4, 2014 by Hiteshwar Thakur
Similar Questions
+2 votes

I normally use git on linux, though I have an installation on a Windows 7 laptop.When using it yesterday to clone a repository on my linux machine, the clonewould open with one of the files modified. I could not undo the modification. Repeated cloning would do the same thing. I then tried cloning from the originalrepo, but using a linux partition on that laptop. It worked fine. Any idea why theWindows git doesn't work?

+2 votes

For weeks I have been running Windows 10 tech preview and EVERYTHING loads and runs great ... except maybe Git. When I click on the installer/loader file in explorer it causes explorer to crash. Anyone out the a Windows 10 insider, or can anyone comment on ...

+1 vote

I wanted to avoid push if any of the files is deleted from the local git clone area. Can anyone please help me with that?

I am using Stash for repository management.

+1 vote

I've been using git for some time now, and host my remote bare repositories on my shared hosting account at As a protective feature on their shared host setup, they enact a policy that kills processes that consume too much memory. This happens to git sometimes.

By "sometimes" I mean on large repos (>~500MB), when performing operations like git gc and git fsck and, most annoyingly, when doing a clone. It seems to happen in the pack phase, but I can't be sure exactly.

I've messed around with the config options like pack.threads and pack.sizeLimit, and basically anything on the git config manpage that mentions memory. I limit all of these things to 1 or 0 or 1m when applicable, just to be sure. To be honest, I really don't know what I'm doing ;)

Oddly enough, I'm having trouble reproducing my issue with anything but git fsck. Clones were failing in the past, but after a successful git gc, everything seems to be ok(?)

Anyway, I'd like some advice on what settings limit memory usage, and exactly how to determine what the memory usage will be with certain values.

+2 votes

I'm try to Git Server on my windows machine, From Google I get only how to install GIT GUI only.

For testing I need to make my window machine as GIT server, can any please provide me the GIT Server S/W location and installation guide PDF or URL.

Useful Links with Similar Problem
Contact Us
+91 9880187415
#470/147, 3rd Floor, 5th Main,
HSR Layout Sector 7,
Bangalore - 560102,
Karnataka INDIA.