Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why cannot add a large file to a Git repository

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?
like image 990
Daniel Peñalba Avatar asked Mar 18 '23 11:03

Daniel Peñalba


1 Answers

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

  • https://github.com/jedbrown/git-fat

  • https://git-lfs.github.com/

like image 159
Leon Avatar answered Mar 21 '23 05:03

Leon