In my normal core.autocrlf=true repositories on Windows I had a file with \n line separators (intentionally). After saving as a stash and applying it later, it was changed back to \r\n which was a little bit unexpected for me.
How can I make saving and applying a stash not convert any line separator but keep the files as is?
Before stash , you can turn off the crlf conversion.
git config --global core.autocrlf false
You can turn it back after you apply stash.
You can use .gitattributes or .git/info/attributes to change CRLF handling on specific files. For example,
*.special text eol=lf
will always convert to \n in the Git repository. See man gitattributes for more.
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