Git: Removing carriage returns from source-controlled files
I've got a Git repository that has some files with DOS format ( \r\n line endings). I would like to just run the files through dos2unix (which would change all files to UNIX format, with \n line endings), but how badly would this affect history, and is it recommended at all? I assume that the standard is to always use UNIX line endings for source-controlled files, and optionally switch to OS-specific line endings locally? The approach you’ll have to use depends on how public your repository is. If you don’t mind or care about changing all SHAs because you’re more or less the only one using it