Git lfs already saved file as text - how to change it to binary?

28 Views Asked by At

I've already pushed file 'New Terrain.asset' for Unity as text with previous commits. But I've noticed that it is downloaded with error on every project cloning.

I've changed manually .gitattribute file adding: LightingData.asset filter=lfs diff=lfs merge=lfs -text *Terrain.asset filter=lfs diff=lfs merge=lfs -text and pushed it as commit to master but every project cloning still downloads that file as a text. How should I force git lfs to handle it as binary?

1

There are 1 best solutions below

0
Juan_m_2 On

Having the file with the correct EOL on your working tree, run the command

git add --renormalize .

And then commit. This will update the correct EOL for that file on git repository.