I have a text file with sample data which I want to put under Git control (on Windows). How can I tell Git to treat this file as binary, so it does not convert line separators (like for the other/text files in the repository).
Write this in .gitattributes (in the file’s directory or higher up):
myfile.bin -text
See the manual for more explanation.
While -text
in .gitattributes
did not worked,
myfile.bin binary
did.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With