-
-
Notifications
You must be signed in to change notification settings - Fork 33
Update .gitattributes with comprehensive best practices for .NET projects #311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+309
−51
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
cf8ed26
Initial plan
Copilot 736371e
Update .gitattributes with comprehensive best practices for .NET proj…
Copilot 6bc6eec
Fix SVG file handling - use text with LF instead of binary LFS
Copilot 628586e
Address feedback: change project files to LF, remove build artifacts …
Copilot c989e87
Add Git LFS setup instructions to README files in Content/Library and…
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,105 @@ | ||
| # Auto detect text files | ||
| # Normalize line endings for all text files | ||
| * text=auto | ||
|
|
||
| # Custom for Visual Studio | ||
| *.cs diff=csharp text=auto eol=lf | ||
| *.vb diff=csharp text=auto eol=lf | ||
| *.fs diff=csharp text=auto eol=lf | ||
| *.fsi diff=csharp text=auto eol=lf | ||
| *.fsx diff=csharp text=auto eol=lf | ||
| *.sln text eol=crlf merge=union | ||
| *.csproj merge=union | ||
| *.vbproj merge=union | ||
| *.fsproj merge=union | ||
| *.dbproj merge=union | ||
| ############################### | ||
| # .NET Language Files | ||
| ############################### | ||
| # Force LF for source code files to ensure consistency across platforms | ||
| *.cs diff=csharp text eol=lf | ||
| *.vb diff=csharp text eol=lf | ||
| *.fs diff=csharp text eol=lf | ||
| *.fsi diff=csharp text eol=lf | ||
| *.fsx diff=csharp text eol=lf | ||
|
|
||
| ############################### | ||
| # .NET Project Files | ||
| ############################### | ||
| # Force LF for cross-platform compatibility | ||
| *.sln text eol=lf merge=union | ||
| *.csproj text eol=lf merge=union | ||
| *.vbproj text eol=lf merge=union | ||
| *.fsproj text eol=lf merge=union | ||
| *.dbproj text eol=lf merge=union | ||
| *.props text eol=lf | ||
| *.targets text eol=lf | ||
|
|
||
| ############################### | ||
| # Windows Scripts | ||
| ############################### | ||
| # Force CRLF for Windows batch files and scripts | ||
| *.cmd text eol=crlf | ||
| *.bat text eol=crlf | ||
|
|
||
| ############################### | ||
| # Unix/Linux Scripts | ||
| ############################### | ||
| # Force LF for shell scripts | ||
| *.sh text eol=lf | ||
|
|
||
| # Standard to msysgit | ||
| *.doc diff=astextplain | ||
| ############################### | ||
| # Configuration Files | ||
| ############################### | ||
| # Configuration and data files should use LF | ||
| *.json text eol=lf | ||
| *.yml text eol=lf | ||
| *.yaml text eol=lf | ||
| *.xml text eol=lf | ||
| *.config text eol=lf | ||
| *.md text eol=lf | ||
| *.html text eol=lf | ||
| *.css text eol=lf | ||
| *.js text eol=lf | ||
| *.ts text eol=lf | ||
|
|
||
| ############################### | ||
| # Binary Files - Git LFS | ||
| ############################### | ||
| # Images | ||
| *.png filter=lfs diff=lfs merge=lfs -text | ||
| *.jpg filter=lfs diff=lfs merge=lfs -text | ||
| *.jpeg filter=lfs diff=lfs merge=lfs -text | ||
| *.gif filter=lfs diff=lfs merge=lfs -text | ||
| *.bmp filter=lfs diff=lfs merge=lfs -text | ||
| *.ico filter=lfs diff=lfs merge=lfs -text | ||
| *.svg text eol=lf | ||
|
|
||
| # Documents | ||
| *.pdf filter=lfs diff=lfs merge=lfs -text | ||
| *.doc filter=lfs diff=lfs merge=lfs -text | ||
| *.docx filter=lfs diff=lfs merge=lfs -text | ||
| *.xls filter=lfs diff=lfs merge=lfs -text | ||
| *.xlsx filter=lfs diff=lfs merge=lfs -text | ||
| *.ppt filter=lfs diff=lfs merge=lfs -text | ||
| *.pptx filter=lfs diff=lfs merge=lfs -text | ||
|
|
||
| # Archives | ||
| *.zip filter=lfs diff=lfs merge=lfs -text | ||
| *.tar filter=lfs diff=lfs merge=lfs -text | ||
| *.gz filter=lfs diff=lfs merge=lfs -text | ||
| *.rar filter=lfs diff=lfs merge=lfs -text | ||
| *.7z filter=lfs diff=lfs merge=lfs -text | ||
|
|
||
| # Native Libraries (excluding .NET build artifacts) | ||
| *.so filter=lfs diff=lfs merge=lfs -text | ||
| *.dylib filter=lfs diff=lfs merge=lfs -text | ||
| *.lib filter=lfs diff=lfs merge=lfs -text | ||
| *.a filter=lfs diff=lfs merge=lfs -text | ||
|
|
||
| # Media Files | ||
| *.mp4 filter=lfs diff=lfs merge=lfs -text | ||
| *.avi filter=lfs diff=lfs merge=lfs -text | ||
| *.mov filter=lfs diff=lfs merge=lfs -text | ||
| *.mp3 filter=lfs diff=lfs merge=lfs -text | ||
| *.wav filter=lfs diff=lfs merge=lfs -text | ||
|
|
||
| ############################### | ||
| # Legacy Binary Handling | ||
| ############################### | ||
| # Fallback for document types that might not use LFS | ||
| *.DOC diff=astextplain | ||
| *.docx diff=astextplain | ||
| *.DOCX diff=astextplain | ||
| *.dot diff=astextplain | ||
| *.DOT diff=astextplain | ||
| *.pdf diff=astextplain | ||
| *.PDF diff=astextplain | ||
| *.rtf diff=astextplain | ||
| *.RTF diff=astextplain | ||
| *.rtf diff=astextplain | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,105 @@ | ||
| # Auto detect text files | ||
| # Normalize line endings for all text files | ||
| * text=auto | ||
|
|
||
| # Custom for Visual Studio | ||
| *.cs diff=csharp text=auto eol=lf | ||
| *.vb diff=csharp text=auto eol=lf | ||
| *.fs diff=csharp text=auto eol=lf | ||
| *.fsi diff=csharp text=auto eol=lf | ||
| *.fsx diff=csharp text=auto eol=lf | ||
| *.sln text eol=crlf merge=union | ||
| *.csproj merge=union | ||
| *.vbproj merge=union | ||
| *.fsproj merge=union | ||
| *.dbproj merge=union | ||
| ############################### | ||
| # .NET Language Files | ||
| ############################### | ||
| # Force LF for source code files to ensure consistency across platforms | ||
| *.cs diff=csharp text eol=lf | ||
| *.vb diff=csharp text eol=lf | ||
| *.fs diff=csharp text eol=lf | ||
| *.fsi diff=csharp text eol=lf | ||
| *.fsx diff=csharp text eol=lf | ||
|
|
||
| ############################### | ||
| # .NET Project Files | ||
| ############################### | ||
| # Force LF for cross-platform compatibility | ||
| *.sln text eol=lf merge=union | ||
| *.csproj text eol=lf merge=union | ||
| *.vbproj text eol=lf merge=union | ||
| *.fsproj text eol=lf merge=union | ||
| *.dbproj text eol=lf merge=union | ||
| *.props text eol=lf | ||
| *.targets text eol=lf | ||
|
|
||
| ############################### | ||
| # Windows Scripts | ||
| ############################### | ||
| # Force CRLF for Windows batch files and scripts | ||
| *.cmd text eol=crlf | ||
| *.bat text eol=crlf | ||
|
|
||
| ############################### | ||
| # Unix/Linux Scripts | ||
| ############################### | ||
| # Force LF for shell scripts | ||
| *.sh text eol=lf | ||
|
|
||
| # Standard to msysgit | ||
| *.doc diff=astextplain | ||
| ############################### | ||
| # Configuration Files | ||
| ############################### | ||
| # Configuration and data files should use LF | ||
| *.json text eol=lf | ||
| *.yml text eol=lf | ||
| *.yaml text eol=lf | ||
| *.xml text eol=lf | ||
| *.config text eol=lf | ||
| *.md text eol=lf | ||
| *.html text eol=lf | ||
| *.css text eol=lf | ||
| *.js text eol=lf | ||
| *.ts text eol=lf | ||
|
|
||
| ############################### | ||
| # Binary Files - Git LFS | ||
| ############################### | ||
| # Images | ||
| *.png filter=lfs diff=lfs merge=lfs -text | ||
| *.jpg filter=lfs diff=lfs merge=lfs -text | ||
| *.jpeg filter=lfs diff=lfs merge=lfs -text | ||
| *.gif filter=lfs diff=lfs merge=lfs -text | ||
| *.bmp filter=lfs diff=lfs merge=lfs -text | ||
| *.ico filter=lfs diff=lfs merge=lfs -text | ||
| *.svg text eol=lf | ||
|
|
||
| # Documents | ||
| *.pdf filter=lfs diff=lfs merge=lfs -text | ||
| *.doc filter=lfs diff=lfs merge=lfs -text | ||
| *.docx filter=lfs diff=lfs merge=lfs -text | ||
| *.xls filter=lfs diff=lfs merge=lfs -text | ||
| *.xlsx filter=lfs diff=lfs merge=lfs -text | ||
| *.ppt filter=lfs diff=lfs merge=lfs -text | ||
| *.pptx filter=lfs diff=lfs merge=lfs -text | ||
|
|
||
| # Archives | ||
| *.zip filter=lfs diff=lfs merge=lfs -text | ||
| *.tar filter=lfs diff=lfs merge=lfs -text | ||
| *.gz filter=lfs diff=lfs merge=lfs -text | ||
| *.rar filter=lfs diff=lfs merge=lfs -text | ||
| *.7z filter=lfs diff=lfs merge=lfs -text | ||
|
|
||
| # Native Libraries (excluding .NET build artifacts) | ||
| *.so filter=lfs diff=lfs merge=lfs -text | ||
| *.dylib filter=lfs diff=lfs merge=lfs -text | ||
| *.lib filter=lfs diff=lfs merge=lfs -text | ||
| *.a filter=lfs diff=lfs merge=lfs -text | ||
|
|
||
| # Media Files | ||
| *.mp4 filter=lfs diff=lfs merge=lfs -text | ||
| *.avi filter=lfs diff=lfs merge=lfs -text | ||
| *.mov filter=lfs diff=lfs merge=lfs -text | ||
| *.mp3 filter=lfs diff=lfs merge=lfs -text | ||
| *.wav filter=lfs diff=lfs merge=lfs -text | ||
|
|
||
| ############################### | ||
| # Legacy Binary Handling | ||
| ############################### | ||
| # Fallback for document types that might not use LFS | ||
| *.DOC diff=astextplain | ||
| *.docx diff=astextplain | ||
| *.DOCX diff=astextplain | ||
| *.dot diff=astextplain | ||
| *.DOT diff=astextplain | ||
| *.pdf diff=astextplain | ||
| *.PDF diff=astextplain | ||
| *.rtf diff=astextplain | ||
| *.RTF diff=astextplain | ||
| *.rtf diff=astextplain |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,105 @@ | ||
| # Auto detect text files | ||
| # Normalize line endings for all text files | ||
| * text=auto | ||
|
|
||
| # Custom for Visual Studio | ||
| *.cs diff=csharp text=auto eol=lf | ||
| *.vb diff=csharp text=auto eol=lf | ||
| *.fs diff=csharp text=auto eol=lf | ||
| *.fsi diff=csharp text=auto eol=lf | ||
| *.fsx diff=csharp text=auto eol=lf | ||
| *.sln text eol=crlf merge=union | ||
| *.csproj merge=union | ||
| *.vbproj merge=union | ||
| *.fsproj merge=union | ||
| *.dbproj merge=union | ||
| ############################### | ||
| # .NET Language Files | ||
| ############################### | ||
| # Force LF for source code files to ensure consistency across platforms | ||
| *.cs diff=csharp text eol=lf | ||
| *.vb diff=csharp text eol=lf | ||
| *.fs diff=csharp text eol=lf | ||
| *.fsi diff=csharp text eol=lf | ||
| *.fsx diff=csharp text eol=lf | ||
|
|
||
| ############################### | ||
| # .NET Project Files | ||
| ############################### | ||
| # Force LF for cross-platform compatibility | ||
| *.sln text eol=lf merge=union | ||
| *.csproj text eol=lf merge=union | ||
| *.vbproj text eol=lf merge=union | ||
| *.fsproj text eol=lf merge=union | ||
| *.dbproj text eol=lf merge=union | ||
| *.props text eol=lf | ||
| *.targets text eol=lf | ||
|
|
||
| ############################### | ||
| # Windows Scripts | ||
| ############################### | ||
| # Force CRLF for Windows batch files and scripts | ||
| *.cmd text eol=crlf | ||
| *.bat text eol=crlf | ||
|
|
||
| ############################### | ||
| # Unix/Linux Scripts | ||
| ############################### | ||
| # Force LF for shell scripts | ||
| *.sh text eol=lf | ||
|
|
||
| # Standard to msysgit | ||
| *.doc diff=astextplain | ||
| ############################### | ||
| # Configuration Files | ||
| ############################### | ||
| # Configuration and data files should use LF | ||
| *.json text eol=lf | ||
| *.yml text eol=lf | ||
| *.yaml text eol=lf | ||
| *.xml text eol=lf | ||
| *.config text eol=lf | ||
| *.md text eol=lf | ||
| *.html text eol=lf | ||
| *.css text eol=lf | ||
| *.js text eol=lf | ||
| *.ts text eol=lf | ||
|
|
||
| ############################### | ||
| # Binary Files - Git LFS | ||
| ############################### | ||
| # Images | ||
| *.png filter=lfs diff=lfs merge=lfs -text | ||
| *.jpg filter=lfs diff=lfs merge=lfs -text | ||
| *.jpeg filter=lfs diff=lfs merge=lfs -text | ||
| *.gif filter=lfs diff=lfs merge=lfs -text | ||
| *.bmp filter=lfs diff=lfs merge=lfs -text | ||
| *.ico filter=lfs diff=lfs merge=lfs -text | ||
| *.svg text eol=lf | ||
|
|
||
| # Documents | ||
| *.pdf filter=lfs diff=lfs merge=lfs -text | ||
| *.doc filter=lfs diff=lfs merge=lfs -text | ||
| *.docx filter=lfs diff=lfs merge=lfs -text | ||
| *.xls filter=lfs diff=lfs merge=lfs -text | ||
| *.xlsx filter=lfs diff=lfs merge=lfs -text | ||
| *.ppt filter=lfs diff=lfs merge=lfs -text | ||
| *.pptx filter=lfs diff=lfs merge=lfs -text | ||
|
|
||
| # Archives | ||
| *.zip filter=lfs diff=lfs merge=lfs -text | ||
| *.tar filter=lfs diff=lfs merge=lfs -text | ||
| *.gz filter=lfs diff=lfs merge=lfs -text | ||
| *.rar filter=lfs diff=lfs merge=lfs -text | ||
| *.7z filter=lfs diff=lfs merge=lfs -text | ||
|
|
||
| # Native Libraries (excluding .NET build artifacts) | ||
| *.so filter=lfs diff=lfs merge=lfs -text | ||
| *.dylib filter=lfs diff=lfs merge=lfs -text | ||
| *.lib filter=lfs diff=lfs merge=lfs -text | ||
| *.a filter=lfs diff=lfs merge=lfs -text | ||
|
|
||
| # Media Files | ||
| *.mp4 filter=lfs diff=lfs merge=lfs -text | ||
| *.avi filter=lfs diff=lfs merge=lfs -text | ||
| *.mov filter=lfs diff=lfs merge=lfs -text | ||
| *.mp3 filter=lfs diff=lfs merge=lfs -text | ||
| *.wav filter=lfs diff=lfs merge=lfs -text | ||
|
|
||
| ############################### | ||
| # Legacy Binary Handling | ||
| ############################### | ||
| # Fallback for document types that might not use LFS | ||
| *.DOC diff=astextplain | ||
| *.docx diff=astextplain | ||
| *.DOCX diff=astextplain | ||
| *.dot diff=astextplain | ||
| *.DOT diff=astextplain | ||
| *.pdf diff=astextplain | ||
| *.PDF diff=astextplain | ||
| *.rtf diff=astextplain | ||
| *.RTF diff=astextplain | ||
| *.rtf diff=astextplain |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Git LFS must be installed and initialized in the repository before these filter rules take effect. Consider adding installation/setup instructions to the README or documenting this requirement in the PR description to prevent confusion when team members encounter LFS pointer files instead of actual binary content.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added note to PR description about Git LFS installation requirement. Teams will need to run
git lfs installandgit lfs trackcommands before these filter rules take effect in new repositories.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot you need to update the README's under
Content/LibraryandContent/Console. Don't rely on the PR for documenting this.