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