It's possible to make git treat a file as binary, to avoid attempts to merge and avoid corruption of line endings etc.
I've attempted to do the same with git-lfs, and opened the .gitattributes file to find that git-lfs (already in use in the repo) has added the following attributes:
*.mat filter=lfs diff=lfs merge=lfs -text
The link above suggests that I add the binary attribute, which is equivalent to:
*.mat -diff -merge -text
I think it's most likely that this is what I'm looking for:
*.mat filter=lfs -diff -merge -text
Which I believe should store the file at the git-lfs endpoint and maintain the relevant pointers, but treat it in exactly the same way git would treat a file with the -diff -merge -text attributes.
I'd normally just try this, but am worried about corrupting binaries... so my three-part question is:
- Is this safe to try?
- Is this correct?
- Is there any documentation beyond that on git attributes that's specific to git-lfs attributes, and if so where?
Thanks in advance!
Tom