#248 Enable git LFS to not bloat the repo
Opened by misc. Modified

Hi,

While trying to fix some docs, I found that the repo, who contain just a bunch of text file is half a gigabit. The main reason is having a file that take around 20 to 50 time more space than all others, the brand book:

$ du -sh project/modules/ROOT/assets/attachments/brand-book-revised-2024.pdf 
243M    project/modules/ROOT/assets/attachments/brand-book-revised-2024.pdf
$ du -sh .git
298M    .git
$ du -sh .
564M    .

Could we not commit pdf files that impact so much the size of the repo and make checkout much longer, consume more resource, etc ?


Metadata Update from @jflory7:
- Issue priority set to: waiting on assignee (was: awaiting triage)
- Issue tagged with: help wanted, type - existing docs

Does Pagure support git LFS? I am not sure if it does. I don't recall when the brand book was added there, but in hindsight, we could have come up with a better location.

I think there has been some ongoing work to convert this document into a module in the Design Team docs, but I am not sure how far along that is.

Forgejo support git-lfs (I know gitea does), so this could be a conversion once there is a move.

One issue is whether Openshift support git-lfs.

I wasn't able to find a conclusive answer on whether this is supported or not after a quick web search (and a longer code search), so I will either have to test and/or ask someone with a deeper knowledge of Openshift in the office.

So answering to myself: https://github.com/openshift/library-go/blob/master/pkg/git/repository.go this is the code doing git operation on Openshift, no mention of git lfs. However, it should be on the image so I think the trick is just to do git lfs checkout manually before building, I guess somewhere in https://gitlab.com/fedora/docs/docs-website/docs-fp-o/-/blob/prod/build-scripts/rebuild-site.py?ref_type=heads

@misc I am looking to migrate this repository to Forgejo now. I am hitting a bug in the Pagure importer though. I will need to escalate for support.

I looked through another Forgejo repo I have admin access to on forge.fp.o and I did not see anything specific about git-lfs. Is this an extension or add-on we need for our version of Forgejo?

Metadata