I run my own Private GitLab CE and I’m updated to the latest version of 14.8.2 (rather behind I’m aware, but is unrelated to this issue)
As our Git Repo builds, which includes many LFS files (Large 3D Files primarily), we are slowly running out of disk space on our Server. Any time a big push is made, which usually includes large 3D Files, the Git History becomes quite large. It is also becoming more difficult for new Team Members who join our project to go through the initial clone as the project continues to inflate.
Any recommendations for lowering our Git Repo Size? Some ideas have been coming to mind, from what I know about Git:
- Reduce or even remove the Git Commit History. This is quite extreme I’m sure, but I imagine that should remove a lot of the Git Repo bloat, yes? I’m not sure any of our Programmers even need to refer to past commits, or (if they do) only some of the most recent ones.
- Reduce or even remove the Merge Request History. Likely also extreme, but I imagine this also takes up a lot of Git Repo Bloat, especially as we’ve had over 100 of them so far, many of which have included several GB in size. Like before, I’m not sure we need the Merge Request History except for perhaps the last few of them.
- Is there some way to ignore the content of large 3D Files that are pushed? When it comes to 3D Files especially, we don’t need to know the contents of the file, just if a file’s Hash has changed. Only Code-related files (which are usually much smaller anyways) should be what we want Git to focus on differences.
- We have another large Git Repo on the GitLab Server. It isn’t pushed to anymore and simply exists for reference. I think it’d be an even better candidate for removing the Git Commit and/or Merge Request History of. Obviously won’t solve the issue of Bloat specifically for the Repo in use right now.
While there’s the solution of “Get more disk space”, it’s not a simple solution for me: the Server is quite remote from my location. I also have not had the experience of adding Hard Drives to an existing mirrored RAID, so really nervous about adding more even if I get physical access to this Server. I really just need a faster solution to lower the Git Repo Bloat right now.
Being the Git Newbie I am, I’m unsure the best way to perform any of what I suggested above. If possible, I’d prefer to do it via GitLab GUI if possible, as I’d prefer not to break anything in the project.