4

Why Git does not support committing very big files? I'm trying to add a 4Gb file and I get the following error:

C:\Users\danipen\gitrepos\vmstore>git add mybigfile.rar
fatal: Out of memory? mmap failed: No such file or directory

UPDATE: Seems that git has a problem handling big files.

  • Do you know any workaround for this issue?
  • Maybe should I split the large file in chunks?
Community
  • 1
  • 1
Daniel Peñalba
  • 30,507
  • 32
  • 137
  • 219

2 Answers2

4

Should large binary files be in the repository, my opinion is no.

But if you really need version control on binaries or assets consider something like git-fat, or git-lfs

Community
  • 1
  • 1
Leon
  • 12,013
  • 5
  • 36
  • 59
3

The idea of Git is to track small files with code. So the suggestion is to include your source files and ignore very big files like static files.

if you include a 4GB file every people who clone the repo have to clone the whole 4GB. Thats not the right way.

René Höhle
  • 26,716
  • 22
  • 73
  • 82