I recently added a .gitattributes file to a c# repository with the following settings:
* text=auto
*.cs text diff=csharp
I renormalized the repository following these instructions from github and it seemed to work OK.
The problem I have is when I checkout some files (not all of them) I see lots of weird characters mixed in with the actual code. It seems to happen when git runs the files through the lf->crlf
conversion specified by the .gitattributes file above.
According to Notepad++ the files that get messed up are using UCS-2 Little Endian
or UCS-2 Big Endian
encoding. The files that seem to work OK are either ANSI
or UTF-8
encoded.
For reference my git version is 1.8.0.msysgit.0
and my OS is Windows 8.
Any ideas how I can fix this? Would changing the encoding of the files be enough?