⚙️ .gitattributes
.gitattributes controls how Git handles files: diffing, merging, line endings, and binary detection.
🎓 Who This Is For
- Beginners learning repository configuration
- Intermediate users improving collaboration workflows
- Advanced engineers needing structured reference
- DevOps and developers working with multi-language repos
🔧 Common Use Cases
- Enforcing LF/CRLF
- Marking binary files
- Custom diff drivers
- Language-specific merge strategies
🧩 Examples
Enforce LF
Mark binary files
| *.png binary
*.jpg binary
|
Better diffs for languages
| *.cs diff=csharp
*.js diff=javascript
|