DEV Community


Discussion on: 🙏 Please Add .gitattributes To Your Git Repository

circleofconfusion profile image
Shane Knudsen

Aside from issues with prettier, we get the occasional problem where changing the eol character(s) causes a file to show up in source control as if it's been changed.

Much worse, I used to write a bunch of BASH scripts meant to be run on both Linux and Windows machines (under Cygwin). Every so often, somebody would edit the file on a Windows machine, commit it, and then the script would fail to run on the Linux machines because of the line endings. Me and dos2unix got to be good friends.

deadlybyte profile image
Carl Saunders Author

Yeah, I had this same problem with Linux scripts at my old work place too.

vtvh profile image

I love dos2unix too, occasionally do clippaste | dos2unix for Windows clipboard to work correctly in Wsl.

Forem Open with the Forem app