I tried searching various other post but could not resolve my issue.
Below is the error message that I get while doing git pull
error: cannot fork() for rev-list: Cannot allocate memory
error: Could not run
git rev-list
error: cannot fork() for fetch-pack: Cannot allocate memory
I tried below command but unable to resolve it,
Only the thing is that, there are many branches(100+). And the repo size is just 9MB (each file not greater than 100kb).
I thought of cloning the repo at some other location, but the clone failed with same error.
This happens when your machine does not have enough memory. It can be because of one or more processes that are consuming too much memory. To solve this, you have to quit the memory consuming process.
Rebooting your OS may also help fix this issue. If rebooting didn't help, there is some memory expensive process that starts at system startup.
In Linux systems, please try the following:
ps aux --sort -rss
to list processes sorted by RAM usage.PID
(process id) of first one or two processes in the list. (You can identify the process from column name COMMAND
)kill
command to kill that process. eg: kill 11234
(where 11234 is the PID)git pull
or whatever git command you were tryingIn Windows, use Task manager to find and stop the memory consuming process or task.
In Mac OS you can use the built-in Activity Monitor app to find the culprit (Use the memory tab)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With