-2

I am working on a Django project that has 3 Large files.

  • 1st file: 4.3 GB
  • 2nd file: ~ 600 MB
  • 3rd file: ~ 30 MB

The Problem is that Git can't handle large files and crashes. I used Git LFS to track the large files but the problem still exists, because if I push it to the GitLab repo, it exceeds the GitLab repo limit size(5 GB) or at least slows down the project.

What can I do?

Mahdi Jafari
  • 347
  • 6
  • 22
  • Those 3 files are 4.93 GB total, so they don't exceed 5GB. – sashoalm Jun 28 '23 at 07:07
  • But with the project itself and other files, will exceed. And in future the project will grow. – Mahdi Jafari Jun 28 '23 at 07:09
  • Buy more space: https://about.gitlab.com/pricing/faq-paid-storage-transfer/ Or find a cheaper hosting. Or remove and stop tracking huge files in the repositories; store them somewhere else and copy to the destination directories outside of Git. – phd Jun 28 '23 at 08:46
  • 2
    I’m voting to close this question because it needs more business decisions – Mahdi Jafari Jun 28 '23 at 08:58

2 Answers2

1

The answer is - do not track large binary files in GitLab. If it has a repo limit of 5GB, obviously you can't exceed it - so you have to lower the size of your file, or remove it from the repo.

sashoalm
  • 75,001
  • 122
  • 434
  • 781
  • Since the files are required for the project, is there any solution to store them anywhere else and use them normally? – Mahdi Jafari Jun 28 '23 at 07:11
  • I assume there are a myriad of solutions, but this is not a question that is answerable. It is a design decision ultimately. – sashoalm Jun 28 '23 at 07:13
0

Use .gitignore to track unused dependencies that you should not use while pushing your code. You may find this helpful list of gitignores. Use one of these as per your project requirements.

geeky01adarsh
  • 312
  • 3
  • 14