Skip to content

Instantly share code, notes, and snippets.

@xerardoo
Created August 17, 2025 20:09
Show Gist options
  • Save xerardoo/ca13e7abee18a9342e45ab6b8370d6b0 to your computer and use it in GitHub Desktop.
Save xerardoo/ca13e7abee18a9342e45ab6b8370d6b0 to your computer and use it in GitHub Desktop.
Git Attributes file to allow Git handles line endings consistently
# Set default behavior to automatically normalize line endings
* text=auto eol=lf
# Force batch scripts to use CRLF
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
# Force bash scripts to use LF
*.sh text eol=lf
# Source code
*.tsx text eol=lf
*.ts text eol=lf
*.js text eol=lf
*.jsx text eol=lf
*.json text eol=lf
*.css text eol=lf
*.scss text eol=lf
*.html text eol=lf
*.md text eol=lf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment