Netlify LFS, PDF is not replaced by pointer, how to troubleshoot?

I went thought the Netlify Large Media setup steps starting here for my Hugo site’s github repo.

I set .gitattributes to track static/tidningar/* filter=lfs diff=lfs merge=lfs -text
I added a file: static/tidningar/1900_15.pdf
When I run git lfs ls-files it lists static/tidningar/1900_15.pdf
When I run git push origin main I see that the file gets uploaded as LFS, and I’m then able to access the file at /tidningar/1900_15.pdf on the site

However, when I look in the github repo in the folder static/tidningar/, the file is not a pointer text file as expected, but instead the actual PDF. I’m not to supposed to see it like that, right? How do I troubleshoot this?

Did I miss a step or do something wrong? I did start off by visiting and following those steps before I realised I need to do the Netlify specific steps - but I don’t think that should make a difference.

Thanks for any tips!

If you have enabled Large Media for the site the Git LFS endpoint is now at Netlify and not at GitHub. You will not see the changes for Git LFS files at GitHub because the Git LFS service used for this repo is no there.

If there are other questions or concerns, please let us know.

I don’t quite comprehend. It says in Netlify setup here: “When the tracked files are uploaded to Large Media, Git replaces them with pointer files in your remote repository. If you navigate to one of the files on your Git provider, you will find plain text information about the original file.” When I do that, I’m not seeing plain text information in Github (as shown by the screenshot example), instead I’m seeing the actual 30 MB binary PDF file. So I’m presuming something is wrong - if I keep uploading PDF files in this way, I will bloat the github repo with binary files. Your documentation and my experience is different, so I presume something is wrong!? Please tell me how to troubleshoot.

ps. the above is both for migrated PDF files, and new ones that I have added and committed after going through the Netlify LFS setup steps.

Hi, @robertsilen. To troubleshoot I would look at the site configuration, the Git LFS configuration for the local system, and examine the repo at GitHub.

However, I don’t know which site this is for or which GitHub repo as that information has not been shared so far. There is a repo name in the screenshot but without the username it is not enough information to find the repo.

Would you please tell us what site this is for? Please note, if your repo is private I won’t be able to see it to troubleshoot which will greatly limit my ability to provide answers.

You can post that information publicly or you can private message (PM) that to one of our support staff. I’ve confirmed that PMs are enabled for your forum login. Please keep in mind that only one person can see the PM and this will likely mean a slower reply than posting the information publicly. Please feel free to reply to however you prefer though.