v1.31.0
conocimientogit-best-practicespatterns/

gitattributes-config.md

Referencia que git-best-practices carga bajo demanda desde su SKILL.md.

git-best-practicesskill
patternscarpeta
2379 Btamaño
2026-09-16último cambio del pack

Skill: git-best-practices

Line endings, LFS, diff drivers y merge strategies.


.gitattributes para .NET

# Auto-detect text files and normalize line endings
* text=auto

# Source code - LF
*.cs text diff=csharp
*.csx text diff=csharp
*.vb text diff=csharp
*.razor text
*.cshtml text
*.xaml text
*.json text
*.xml text
*.config text
*.props text
*.targets text
*.md text
*.yml text
*.yaml text
*.sql text
*.html text
*.css text
*.js text
*.ts text

# Solution files - CRLF (Visual Studio requirement)
*.sln text eol=crlf
*.slnx text eol=crlf
*.csproj text eol=crlf
*.vbproj text eol=crlf
*.fsproj text eol=crlf

# Shell scripts - LF
*.sh text eol=lf
*.bash text eol=lf

# PowerShell - CRLF
*.ps1 text eol=crlf
*.psm1 text eol=crlf
*.psd1 text eol=crlf

# Binary files (no diff, no merge)
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.svg binary
*.woff binary
*.woff2 binary
*.ttf binary
*.eot binary
*.pdf binary
*.zip binary
*.dll binary
*.exe binary
*.pdb binary
*.nupkg binary

# Git LFS (large files)
# Descomentar si se usa Git LFS:
# *.psd filter=lfs diff=lfs merge=lfs -text
# *.ai filter=lfs diff=lfs merge=lfs -text
# *.mp4 filter=lfs diff=lfs merge=lfs -text
# *.mov filter=lfs diff=lfs merge=lfs -text

# Linguist overrides (para estadisticas de GitHub)
_patron/** linguist-documentation
*.template linguist-generated

Git LFS

Cuando usar LFS

ArchivoLFSRazon
Imagenes > 1MBSiBinario grande
VideosSiBinarios grandes
PDFs generadosSiCambian frecuentemente
Archivos PSD/AISiBinarios grandes
DLLs de tercerosSiBinarios
NuGet packagesNoUsar NuGet restore
node_modulesNoUsar npm install

Configuracion LFS

# Instalar Git LFS
git lfs install

# Trackear tipos de archivos
git lfs track "*.psd"
git lfs track "*.mp4"
git lfs track "*.pdf"

# El .gitattributes se actualiza automaticamente
# Commit del .gitattributes
git add .gitattributes
git commit -m "chore: configure Git LFS tracking"

Merge Strategies por Archivo

# Archivos que no deben mergearse automaticamente
project.lock.json merge=ours
*.designer.cs merge=ours

# Archivos generados - siempre regenerar
*.g.cs -merge
*.generated.cs -merge

Pattern 1.0.0

← Volver a la ficha de git-best-practices

Ovillo v1.31.0tag v1.31.0 (2026-10-06) · sin decisiones posteriores69 skills · 19 agents · 22 hooks · 3 reglas · 15 tools · 103 decisionesfuente: ovillo/.claude/skills/git-best-practices/patterns/gitattributes-config.mdCopyright 2026 Hugo Valer Rojas · Apache-2.0