-
Notifications
You must be signed in to change notification settings - Fork 964
Add .gitattributes to enforce LF line endings #3556
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: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| # Set default behavior to automatically normalize line endings. | ||
| * text=auto | ||
|
|
||
| # Force LF line endings for all text files | ||
| *.py text eol=lf | ||
| *.sh text eol=lf | ||
| *.bash text eol=lf | ||
| *.fish text eol=lf | ||
| *.zsh text eol=lf | ||
|
|
||
| # Configuration files | ||
| *.ini text eol=lf | ||
| *.cfg text eol=lf | ||
| *.conf text eol=lf | ||
| *.config text eol=lf | ||
| *.toml text eol=lf | ||
| *.yaml text eol=lf | ||
| *.yml text eol=lf | ||
| *.json text eol=lf | ||
|
|
||
| # Documentation | ||
| *.md text eol=lf | ||
| *.rst text eol=lf | ||
| *.txt text eol=lf | ||
|
|
||
| # SQL files | ||
| *.sql text eol=lf | ||
|
|
||
| # Web files | ||
| *.html text eol=lf | ||
| *.htm text eol=lf | ||
| *.css text eol=lf | ||
| *.scss text eol=lf | ||
| *.js text eol=lf | ||
| *.jsx text eol=lf | ||
| *.ts text eol=lf | ||
| *.tsx text eol=lf | ||
| *.vue text eol=lf | ||
|
|
||
| # Template files | ||
| *.j2 text eol=lf | ||
| *.jinja text eol=lf | ||
| *.jinja2 text eol=lf | ||
|
|
||
| # Docker files | ||
| Dockerfile* text eol=lf | ||
| *.dockerfile text eol=lf | ||
| docker-compose*.yml text eol=lf | ||
|
|
||
| # Makefiles | ||
| Makefile text eol=lf | ||
| makefile text eol=lf | ||
| *.mk text eol=lf | ||
|
|
||
| # Git files | ||
| .gitignore text eol=lf | ||
| .gitattributes text eol=lf | ||
| .gitmodules text eol=lf | ||
|
|
||
| # CI/CD files | ||
| .gitlab-ci.yml text eol=lf | ||
| .travis.yml text eol=lf | ||
| appveyor.yml text eol=lf | ||
|
|
||
| # Other common text files | ||
| *.xml text eol=lf | ||
| *.svg text eol=lf | ||
| *.csv text eol=lf | ||
| *.tsv text eol=lf | ||
| *.properties text eol=lf | ||
| *.env text eol=lf | ||
| *.sample text eol=lf | ||
| LICENSE* text eol=lf | ||
| CONTRIBUTING* text eol=lf | ||
| CHANGELOG* text eol=lf | ||
| README* text eol=lf | ||
|
|
||
| # Binary files - ensure they're not modified | ||
| *.png binary | ||
| *.jpg binary | ||
|
Comment on lines
+78
to
+80
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does the automatic behavior account for this already? whats the default behavior? |
||
| *.jpeg binary | ||
| *.gif binary | ||
| *.ico binary | ||
| *.pdf binary | ||
| *.zip binary | ||
| *.tar binary | ||
| *.gz binary | ||
| *.bz2 binary | ||
| *.7z binary | ||
| *.rar binary | ||
| *.exe binary | ||
| *.dll binary | ||
| *.so binary | ||
| *.dylib binary | ||
| *.pyc binary | ||
| *.pyo binary | ||
| *.pyd binary | ||
| *.whl binary | ||
| *.egg binary | ||
|
Comment on lines
+91
to
+99
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a lot of these (from .exe down) are unlikely to be in the repo since many of them are compiled program outputs and wouldnt be checked into git |
||
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.
do we need to specify every single file type like this given that we assume things are ttext files in the first line?