I'm developing on a Mac for a website running locally on a Windows virtual machine (VMware Fusion). The files are in a shared directory, so both OS's are using the same files.
When I edit files on Mac and run them in the Windows VM, I'm getting errors stating "Unexpected end of file" and "Unexpected character in input '".
In my .gitattributes
file, I have * text eol=crlf
, and when I commit, the errors no longer appear for the modified/committed files.
First, can someone tell me if my diagnosis is correct: that the Mac line endings aren't converted to Windows until the files are committed, and that this is resulting in the "syntax-style" errors when running the files on the Windows VM?
Second, is there a way I can configure my Git repository and/or my VM so that both OS's get their preferred line endings?