-
-
Couldn't load subscription status.
- 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
base: master
Are you sure you want to change the base?
Conversation
…ects Co-authored-by: TheAngryByrd <[email protected]>
Co-authored-by: TheAngryByrd <[email protected]>
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.
Pull Request Overview
This PR modernizes the .gitattributes file to implement comprehensive best practices for .NET projects, including Git LFS support for binary files and proper line ending normalization.
Key Changes:
- Implements Git LFS filtering for binary assets (images, documents, archives, executables, media files)
- Establishes platform-specific line ending rules: CRLF for Windows-specific files (.cmd, .bat, Visual Studio project files) and LF for cross-platform source code
- Expands file type coverage with explicit handling for F#, configuration files, and web assets
| *.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 |
Copilot
AI
Oct 26, 2025
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 install and git lfs track commands 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/Library and Content/Console. Don't rely on the PR for documenting this.
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 Also update the .gitattributes under Content
…from LFS, update Content gitattributes Co-authored-by: TheAngryByrd <[email protected]>
… Content/Console Co-authored-by: TheAngryByrd <[email protected]>
Modernizes
.gitattributesto implement Git LFS for binary assets, proper line ending normalization, and .NET-specific file handling per current best practices.Changes
Binary File Handling
Line Ending Normalization
.cmd,.bat) use CRLF for compatibility.sln,.csproj,.props,.targets) use LF for cross-platform consistencyTemplate Integration
.gitattributesfiles in both Content/Library and Content/Console template directoriesDocumentation
git lfs installandgit lfs pullcommands with explanationsFile Type Coverage
.fs,.fsi,.fsx) with proper diff handlingBefore:
After:
Git LFS Setup
Note: Git LFS must be installed and initialized in repositories before these filter rules take effect. Teams should run:
The generated project README files now include comprehensive setup instructions for new developers.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.