I am receiving errors below when I try to push changes(not a problem with memory, or other already issues already mention on stackoverflow), errors are gone when I uninstall
This specific error just got fixed (or at least mitigated) with git-for-windows 2.6.2 (Oct. 19th, 2015)
We no longer run out of page file space when git fetching large repositories.
(applies for push too)
See PR 486: Better mmap() emulation:
a simple
git fetch
would produce this error output:
fatal: mmap failed: No error
fatal: write error: Invalid argument
The reason was that several bits of our
mmap()
emulation left room for improvement. This Pull Request tries to close the gap.
That involves compat/win32mmap.c, and that fix is not yet updated upstream (in git/git)
I was also getting a similar error message when trying to stage an entire folder structure into a new git repo: "fatal: mmap failed: Invalid argument". This error was occurring even though I am using git version 2.8.
After investigating further I found that the best way to debug the problem was to use git add with the verbose option:
git add -A -v
That way I could see exactly which file was causing the failure. With -v I could see that git add failed on a zip file that was about 17MB. So I excluded zip files. Which I don't really need to track.
It then failed again with the same message on a file named "user.fdb.new" which was a rename of a Firebird data base file that was only about 2MB. So I excluded that entire folder. I was then able to complete the staging.
I'm not sure what the problem is but it seems to be related to file type maybe not just file size.
In the end my git repository included about 1600 files spread across 150 folders and encompasing what I thought was about 2GB though the resulting git repo is only about 24MB. I think the largest file is 12MB.
I am running:
git version 2.8.1.windows.1 on Windows XP SP3
My disk space was full and I accidentaly tried to stage a large binary file. After deleting the large file the stage went fine.
I faced the same issue, and realised that OneDrive was paused. If the files are "online", the files will be fetched automatically, but not if OneDrive is paused or not running:
git reset --hard <hash>
fatal: mmap failed: Invalid argument
git status
fatal: mmap failed: Invalid argument
Happened to me after failing to sync my OneDrive files. Its sorted now.