Skip to content

Instantly share code, notes, and snippets.

@bertvv
Created August 18, 2017 17:22
Show Gist options
  • Save bertvv/6c99b8feab64c473eb5e98dc676b4b4e to your computer and use it in GitHub Desktop.
Save bertvv/6c99b8feab64c473eb5e98dc676b4b4e to your computer and use it in GitHub Desktop.
Set line endings of specific file types in a Git repo
# Default behaviour
* text=auto
# Shell scripts should have Unix endings
*.sh text eol=lf
*.bats text eol=lf
*.py text eol=lf
# Windows Batch or PowerShell scripts should have CRLF endings
*.bat text eol=crlf
*.ps1 text eol=crlf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment