title: git clone fails with "fatal: Out of memory, malloc failed" error
body: <p>When I perform a <strong>git clone</strong> from a <strong>bare repository</strong> of my project, on a local server, I get following error message:</p>
  
  <blockquote>
    <p>fatal: <strong>Out of memory, malloc failed</strong> (tried to allocate 2251896833
    bytes) warning: Clone succeeded, but checkout failed. You can inspect
    what was checked out with 'git status' and retry the checkout with
    'git checkout -f HEAD'</p>
  </blockquote>
  
  <p>I tried updating my <code>~/.gitconfig</code> file as stated at answer under <a href="https://stackoverflow.com/questions/41120920/git-fatal-out-of-memory-malloc-failed-tried-to-allocate-889192448-bytes">this question</a>, closed the git bash, restarted and retried without any results.</p>
  
  <p>I ended up trying following configuration but still same results:</p>
  
  <pre><code>$ cat .gitconfig
  [core]
          packedGitLimit = 1024m
          packedGitWindowSize = 1024m
  [pack]
          deltaCacheSize = 1024m
          packSizeLimit = 1024m
          windowMemory = 1024m
  [http]
          postBuffer = 157286400
  </code></pre>
  
  <p>I even tried with <code>git gc</code> on another machine, but not sure how to get the bare repository to garbage collect as well.</p>
  
  <p>I am using <code>git version 2.14.2.windows.1</code> under a <code>32 bits</code> machine with <code>Windows 7</code> with 4GB of RAM.</p>
  
  <p>How to resolve this fatal error on git clone?</p>