I went to my file directory, did
$ git init
$ git add
and then got
fatal: Out of memory? mmap failed: Cannot allocate memory
One folder is maybe 2GB big because it is full of images.. the rest are very small. What can be the problem here?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityYour system don't have enough memory for to pack all the data in your repository into one file, which is git's default setting.
To work around this problem, set the pack.packSizeLimit
configuration option to a value that is well within the available memory of your system.. You can set it with this command:
git config pack.packSizeLimit 1g
You can use the suffixes g
for gigabytes, m
for megabytes, or k
for kilobytes. Calling git config
without any switches will set the setting just for this particular repository. Use the --global
switch to set it globally for your user account or --system
for all user accounts on the machine (this option requires root access).