GIT_LFS_FETCH_INCLUDE no longer working?

Site name:

I’m helping a friend get a netlify site working again now that the previous environment variables section & the Xenial build image are deprecated/gone.

After changing the image to Focal, and migrating the environment variables, I redeployed & now a bunch of files are just git lfs pointers, instead of the actual files. These are files that previously worked fine.

Previously, GIT_LFS_FETCH_INCLUDE was set to “*”. I’ve tried that, and also setting it explicitly to add the files that are no longer working:


I’ve even confirmed that the environment variable is set during the build, by echoing it as part of the build script, and it’s correct.

However, no matter what I do the files are not getting pulled down correctly.

Here’s a link to the deployment logs: Netlify App

Any ideas what’s going on?


I was able to work around this by adding an explicit git lfs pull before any other build steps.

1 Like

Hiya @jfaust :wave:t6: welcome to the forums!

Thanks for coming back and letting us know what got you unstuck! :smiling_face_with_three_hearts: I appreciate the feedback and this will help others who encounter similar issues. Woohoo! :netliconfetti:

Thanks @SamO!

I still think there’s something wrong with GIT_LFS_FETCH_INCLUDE - I created a new Netlify site from the same repo, to make sure it wasn’t something that got broken in the upgrade process, and got the same results.

Can you, please, give a hint where I can manage build steps? I don’t see any settings for my hugo based website. I can try to override a build command to something like git lfs pull && hugo but I don’t think that it’s a proper way to do.

As it turns out, there might be something wrong with Netlify trying to fetch files from Git LFS. Only the extensions listed here: build-image/buildbot-git-config at focal · netlify/build-image · GitHub seem to be correctly fetched. Any custom extensions that you would add using GIT_LFS_FETCH_INCLUDE, do not seem to work at the moment.

This as been escalated to the devs and we would let you know as things develop.

Thanks for the update. Probably it’s possible to temporary allow the usage of the old build image (Ubuntu 16) for Hugo based websites?

Unfortunately not. The deprecated image is no longer available in our systems to revert to. You can build locally and deploy via CLI.


Any progress with this issue? Or estimation? It is difficult to use CLI for the each change, because most of my users are using git based CMS.

A fix for this should now be released. Can you retry?

1 Like

It works. Thanks a lot.

@hrishikesh what is the fix for this? My site did not pull a .webm video that is stored in git-lfs on GitHub. I see from the link above that that extension is not in the default list so I assume there is something I need to do, it just isn’t clear what that is.

Did you check this: Build environment variables | Netlify Docs?


  • GIT_LFS_ENABLED: value that is undefined by default. If set, we’ll use git lfs clone to check out your repository — otherwise we use git clone.
  • GIT_LFS_FETCH_INCLUDE: if GIT_LFS_ENABLED is set, this specifies by file extension which Git LFS files will be downloaded when cloning your repository. Any other file extensions will have only text pointer files downloaded instead of the original media files.