I get constant smudge fails on random files, how can i remove this smudge, why do i need it, why its so unreliable and how do you make it just work?
The Git smudge filter is what converts the LFS pointer stored in Git with the actual large file from the LFS server. If your local repository does not have the LFS object, the smudge filter will have to download it. This means that network issues could affect the smudge filter.
You can turn off the smudge filter with the command git lfs install --skip-smudge
. However, you will be required to run git lfs pull
after you pull down new changes or change branches. You will get the added benefit of parallel downloads through our transfer queue code.
If you're still having problems, you can configure Git LFS to retry multiple times:
# 10 retries per object
$ git config lfs.transfer.maxretries 10
We are working on improvements to the underlying transfer queue code for Git LFS v2.0 (https://github.com/git-lfs/git-lfs/issues/1632) to solve this issue.
We have also adopted a new filter process that a Git LFS contributor added to Git v2.11 (https://github.com/git-lfs/git-lfs/pull/1382), which will start working in Git LFS v1.5.x once the new Git version is released. Our goal is to add more features to Git to support our transfer queue code without having to disable smudging or use special commands like git lfs pull
, but that will take some time. See https://github.com/git-lfs/git-lfs/pull/1646 for some ideas there.
Great answer i hope others will find it very useful as well, thank you.
Is there a way to add that config line to the repository itself in some file like gitignore?
So that all team members will have it.
$ git config --file=.lfsconfig lfs.transfer.maxtretries 10
Then just add .lfsconfig
to your repo.
Brilliant, thank you.
Most helpful comment
The Git smudge filter is what converts the LFS pointer stored in Git with the actual large file from the LFS server. If your local repository does not have the LFS object, the smudge filter will have to download it. This means that network issues could affect the smudge filter.
You can turn off the smudge filter with the command
git lfs install --skip-smudge
. However, you will be required to rungit lfs pull
after you pull down new changes or change branches. You will get the added benefit of parallel downloads through our transfer queue code.If you're still having problems, you can configure Git LFS to retry multiple times:
We are working on improvements to the underlying transfer queue code for Git LFS v2.0 (https://github.com/git-lfs/git-lfs/issues/1632) to solve this issue.
We have also adopted a new filter process that a Git LFS contributor added to Git v2.11 (https://github.com/git-lfs/git-lfs/pull/1382), which will start working in Git LFS v1.5.x once the new Git version is released. Our goal is to add more features to Git to support our transfer queue code without having to disable smudging or use special commands like
git lfs pull
, but that will take some time. See https://github.com/git-lfs/git-lfs/pull/1646 for some ideas there.