The first line of .gitattributes file should be as indicated here.
The .gitattributes file for a C# repository should also include this line, which improves git handling of C# files in some situations:
*.cs text diff=csharp
Repository convention: gitattributes-csharp