Skip to content

Instantly share code, notes, and snippets.

@pingkunga
Created May 3, 2025 10:06
Show Gist options
  • Save pingkunga/532eae8d310acbf4708d36dfbf6a8653 to your computer and use it in GitHub Desktop.
Save pingkunga/532eae8d310acbf4708d36dfbf6a8653 to your computer and use it in GitHub Desktop.
dotnet .gitattributes sample
# Normalize line endings for text files
# Set default behavior to automatically normalize line endings
* text=auto
# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.cs text diff=csharp
*.csproj text
*.sln text
*.config text
*.json text
*.xml text
*.xaml text
# Treat binary files as-is
*.dll binary
*.exe binary
*.pdb binary
*.ico binary
*.zip binary
*.png binary
*.jpg binary
*.jpeg binary
# Merge settings for common .NET project files
*.csproj merge=union
*.sln merge=union
# Ignore changes in generated files
*.designer.cs linguist-generated
*.g.cs linguist-generated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment